Update changeset & documentation
Signed-off-by: Philipp Hugenroth <philipph@spotify.com>
This commit is contained in:
@@ -92,12 +92,12 @@ import InternalToolIcon from './internal-tool.icon.svg';
|
||||
```
|
||||
|
||||
On mobile devices the `Sidebar` is displayed at the bottom of the screen. For
|
||||
customizing the experience you can group `SidebarItems` in a `SidebarGroup` or
|
||||
create a `SidebarGroup` with a link. All `SidebarGroups` are displayed in the
|
||||
bottom navigation with an icon.
|
||||
customizing the experience you can group `SidebarItems` in a `SidebarGroup`
|
||||
(Example 1) or create a `SidebarGroup` with a link (Example 2). All
|
||||
`SidebarGroups` are displayed in the bottom navigation with an icon.
|
||||
|
||||
```ts
|
||||
// ... inside the AppSidebar component
|
||||
// Example 1
|
||||
<SidebarGroup icon={<MenuIcon />} label="Menu">
|
||||
...
|
||||
<SidebarItem icon={ExtensionIcon} to="api-docs" text="APIs" />
|
||||
@@ -105,5 +105,14 @@ bottom navigation with an icon.
|
||||
<SidebarGroup />
|
||||
```
|
||||
|
||||
If no `SidebarGroup`is provided a default menu will display the `Sidebar`
|
||||
```ts
|
||||
// Example 2
|
||||
<SidebarGroup label="Search" icon={<SearchIcon />} to="/search">
|
||||
...
|
||||
<SidebarItem icon={ExtensionIcon} to="api-docs" text="APIs" />
|
||||
...
|
||||
<SidebarGroup />
|
||||
```
|
||||
|
||||
If no `SidebarGroup` is provided a default menu will display the `Sidebar`
|
||||
content.
|
||||
|
||||
Reference in New Issue
Block a user