diff --git a/api-generator/components/megamenu.js b/api-generator/components/megamenu.js index 5c295625ef..4398f863da 100644 --- a/api-generator/components/megamenu.js +++ b/api-generator/components/megamenu.js @@ -28,6 +28,18 @@ const MegaMenuProps = [ type: 'string', default: 'horizontal', description: 'Defines the orientation, valid values are horizontal and vertical.' + }, + { + name: 'start', + type: 'any', + default: 'null', + description: 'The template of starting element.' + }, + { + name: 'end', + type: 'any', + default: 'null', + description: 'The template of trailing element' } ]; diff --git a/components/doc/megamenu/index.js b/components/doc/megamenu/index.js index 4a599e1681..ff0626f798 100644 --- a/components/doc/megamenu/index.js +++ b/components/doc/megamenu/index.js @@ -132,6 +132,9 @@ export class MegaMenuDemo extends Component { ]; } + const start = logo e.target.src='https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png'} height="40" className="mr-2">; + const end = ; + render() { return (
@@ -141,6 +144,11 @@ export class MegaMenuDemo extends Component {
Vertical
+ +
Templating
+ +
+
); @@ -269,6 +277,9 @@ const MegaMenuDemo = () => { } ]; + const start = logo e.target.src='https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png'} height="40" className="mr-2">; + const end = ; + return (
@@ -277,6 +288,11 @@ const MegaMenuDemo = () => {
Vertical
+ +
Templating
+ +
+
); @@ -404,6 +420,9 @@ const MegaMenuDemo = () => { } ]; + const start = logo e.target.src='https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png'} height="40" className="mr-2">; + const end = ; + return (
@@ -412,6 +431,11 @@ const MegaMenuDemo = () => {
Vertical
+ +
Templating
+ +
+
); @@ -542,6 +566,9 @@ const MegaMenuDemo = () => { } ]; + const start = logo e.target.src='https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png'} height="40" className="mr-2">; + const end = ; + return (
@@ -550,6 +577,11 @@ const MegaMenuDemo = () => {
Vertical
+ +
Templating
+ +
+
); @@ -713,13 +745,14 @@ const items = [
Custom Content
-

Any content inside the megamenu will be displayed on the right side by default. You may use ".ui-megamenu-custom" style class to change the location of the content.

+

The megamenu can display custom content by using the "start" and "end" properties.

{` - - -