You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/using_custom_header.rst
+16-9Lines changed: 16 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,8 @@ Overview
8
8
9
9
The ``Header`` component is used to display a header with a provided ``mainMenuItems``,
10
10
``secondaryMenuItems``, and ``userMenuItems`` props. If props are provided, the component will use them; otherwise,
11
-
If any of the props ``(mainMenuItems, secondaryMenuItems, userMenuItems)`` are not provided, default
12
-
items are displayed. This component provides flexibility in customization, making it suitable for a wide
11
+
if any of the props ``(mainMenuItems, secondaryMenuItems, userMenuItems)`` are not provided, default
12
+
items will be displayed. This component provides flexibility in customization, making it suitable for a wide
13
13
range of applications.
14
14
15
15
Props Details
@@ -20,7 +20,7 @@ The `Header` component accepts the following **optional** props for customizatio
20
20
``mainMenuItems``
21
21
*****************
22
22
23
-
The main menu items is a list of menu items objects. On desktop screens, these items are displayed on the left, to the right of the logo icon and to the left of the secondary menu.
23
+
The main menu items is a list of menu items objects. On desktop screens, these items are displayed on the left side next to the logo icon.
24
24
On mobile screens, the main menu is displayed as a dropdown menu triggered by a hamburger icon. The main menu dropdown appears below the logo when opened.
To implement a submenu, set the type to ``submenu`` and provide a ``submenuContent`` property.
48
+
The submenuContent should be a React component (as shown in above example) that can be rendered.
49
+
43
50
**Note:**
44
51
45
52
- The ``type`` should be ``item`` or ``submenu``. If type is ``submenu``, it should contain ``submenuContent`` instead of ``href``.
@@ -67,9 +74,9 @@ userMenuItems
67
74
The user menu items is list of objects. On desktop screens, these items are displayed as a dropdown menu on the most right side of the header. The dropdown is opened by clicking on the avatar icon, which is typically located at the far right of the header.
68
75
On mobile screens, the user menu is also displayed as a dropdown menu, appearing under the avatar icon.
69
76
70
-
User Menu is list of objects. Each object represent a group in user menu. Each object contains the ``heading`` and
77
+
Each object represents a group in the user menu. Each object contains the ``heading`` and
71
78
list of menu items to be displayed in that group. Heading is optional and will be displayed only if passed. There can
72
-
be multiple groups. For a normal user menu, we can pass single group with empty heading.
79
+
be multiple groups. For a normal user menu, a single group can be passed with empty heading.
0 commit comments