Layout
Meny, baslayout, sidomeny, sidhuvud
En skalkomponent för att få en simpel sidomeny och sidhuvud.
Installation
- npm
- Yarn
- pnpm
npm install @midas-ds/components
yarn add @midas-ds/components
pnpm add @midas-ds/components
import { Layout } from '@midas-ds/components'
Använda separat
Det går att importera sidomenyn samt sidhuvudet som separata komponenter om så önskas, det är dock rekommenderat att använda hela Layoutkomponenten.
import { Layout.Header, Layout.Sidebar } from '@midas-ds/components'
Riktlinjer
Kommer snart
API
Namn | Typ | Standard | Beskrivning |
---|---|---|---|
items * | SidebarLinkGroup[] | - | The menu items/item groups |
title * | string | - | Title displayed at the top of the application header |
headerChildren | ReactNode | - | List of links in the top right of the application header |
user * | SidebarUser | - | Current user details |
app * | App | - | Name of the app |
clientSideRouter | (path: string, routerOptions: undefined) => void | - | Provide the layout with your router for client side navigation @see {@link https://designsystem.migrationsverket.se/dev/client-side-routing/} |
clientSideHref | (href: string) => string | - |