Update changeset & documentation

Signed-off-by: Philipp Hugenroth <philipph@spotify.com>
This commit is contained in:
Philipp Hugenroth
2021-11-15 11:55:17 +01:00
parent 7ba416be78
commit 4b8cefcf05
6 changed files with 66 additions and 11 deletions
@@ -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.