diff --git a/src/components/AppLayout/index.stories.tsx b/src/components/AppLayout/index.stories.tsx index 411195dd..bb522740 100644 --- a/src/components/AppLayout/index.stories.tsx +++ b/src/components/AppLayout/index.stories.tsx @@ -137,6 +137,7 @@ export const WithNavItemGroups: Story = { + , diff --git a/src/components/AppLayout/index.tsx b/src/components/AppLayout/index.tsx index 9967eb89..74a0f325 100644 --- a/src/components/AppLayout/index.tsx +++ b/src/components/AppLayout/index.tsx @@ -190,10 +190,13 @@ const AppLayoutBreadcrumbDivider = () => { ) } -interface AppLayoutBreadcrumbItemProps extends MotionProps, PropsWithChildren { +export interface AppLayoutBreadcrumbItemProps + extends MotionProps, + PropsWithChildren { className?: string active?: boolean children?: React.ReactNode + disabled?: boolean onClick?: () => void } @@ -201,22 +204,26 @@ const AppLayoutBreadcrumbItem = ({ children, className, active = false, + disabled = false, onClick, ...props }: AppLayoutBreadcrumbItemProps) => { return ( - {children} - + ) } @@ -324,9 +331,11 @@ const AppLayoutNav = ({ children, className, ...props }: AppLayoutNavProps) => { AppLayoutNav.displayName = 'AppLayout.Nav' -interface AppLayoutNavItemProps extends HTMLAttributes { +export interface AppLayoutNavItemProps + extends HTMLAttributes { title: string icon: IconName + children?: React.ReactNode render?: ({ title, @@ -339,6 +348,7 @@ interface AppLayoutNavItemProps extends HTMLAttributes { }) => React.ReactNode className?: string active?: boolean + disabled?: boolean } const AppLayoutNavItem = ({ @@ -347,6 +357,7 @@ const AppLayoutNavItem = ({ render, className, active, + disabled, ...props }: AppLayoutNavItemProps) => { const { collapsed } = useAppLayout() @@ -359,10 +370,13 @@ const AppLayoutNavItem = ({ -
)} -
+