Skip to content

Commit

Permalink
feat: new page
Browse files Browse the repository at this point in the history
Quentin Le Caignec committed Jun 18, 2024
1 parent d00d218 commit a6ba827
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/two-stingrays-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'storybook-pages': minor
'@smile/haring-react': minor
---

Added AgendaItemPage to storybook pages, Added selectedValue and onSelectedChange props to SidebarMenu
Original file line number Diff line number Diff line change
@@ -109,7 +109,7 @@ export interface ISidebarMenuProps<
/** Controlled callback called when the value of menus open/closed changes */
onMenuOpenChange?: (value: T[]) => void;
/** Controlled callback called when the value of the selected menu changes */
onSelectedChange?: (value?: T) => void;
onSelectedChange?: (value: T | undefined) => void;
/** Controlled state of which menu is currently selected, using `id` field of `IMenuItem` */
selectedValue?: T;
}
Original file line number Diff line number Diff line change
@@ -48,6 +48,7 @@ export function AgendaItemPage(): ReactElement {
menu={menusMock}
menuOpenValue={[openedMenu]}
onMenuOpenChange={(v: string[]) => setOpenedMenu(v[0])}
onSelectedChange={(v) => (v ? setOpenedMenu(v) : null)}
selectedValue={openedMenu}
/>
}

0 comments on commit a6ba827

Please sign in to comment.