mirror of https://github.com/buster-so/buster.git
update items
This commit is contained in:
parent
ba62cb4e25
commit
60b6bc9e5b
|
@ -5,6 +5,7 @@ import {
|
||||||
CollapsibleTrigger
|
CollapsibleTrigger
|
||||||
} from '../collapsible/CollapsibleBase';
|
} from '../collapsible/CollapsibleBase';
|
||||||
import { type ISidebarGroup } from './interfaces';
|
import { type ISidebarGroup } from './interfaces';
|
||||||
|
import { SidebarItem } from './SidebarItem';
|
||||||
|
|
||||||
export const SidebarGroup: React.FC<ISidebarGroup> = React.memo(({ label, items }) => {
|
export const SidebarGroup: React.FC<ISidebarGroup> = React.memo(({ label, items }) => {
|
||||||
return <></>;
|
return <></>;
|
||||||
|
|
|
@ -28,11 +28,17 @@ const itemVariants = cva(
|
||||||
variant: 'default',
|
variant: 'default',
|
||||||
className: 'bg-nav-item-select hover:bg-nav-item-select'
|
className: 'bg-nav-item-select hover:bg-nav-item-select'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
active: false,
|
||||||
|
disabled: true,
|
||||||
|
variant: 'default',
|
||||||
|
className: 'text-text-disabled! bg-transparent'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
active: true,
|
active: true,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
variant: 'emphasized',
|
variant: 'emphasized',
|
||||||
className: 'bg-nav-item-select hover:bg-nav-item-select'
|
className: 'bg-nav-item-select hover:bg-nav-item-select '
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
active: false,
|
active: false,
|
||||||
|
@ -56,8 +62,10 @@ export const SidebarItem: React.FC<ISidebarItem & VariantProps<typeof itemVarian
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ItemNode href={route} className={cn(itemVariants({ active, disabled, variant }))}>
|
<ItemNode href={route} className={cn(itemVariants({ active, disabled, variant }))}>
|
||||||
<span className="text-icon-size text-icon-color">{icon}</span>
|
<span className={cn('text-icon-size text-icon-color', { 'text-text-disabled': disabled })}>
|
||||||
<span className="text-foreground truncate">{label}</span>
|
{icon}
|
||||||
|
</span>
|
||||||
|
<span className="truncate">{label}</span>
|
||||||
</ItemNode>
|
</ItemNode>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue