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
|
||||
} from '../collapsible/CollapsibleBase';
|
||||
import { type ISidebarGroup } from './interfaces';
|
||||
import { SidebarItem } from './SidebarItem';
|
||||
|
||||
export const SidebarGroup: React.FC<ISidebarGroup> = React.memo(({ label, items }) => {
|
||||
return <></>;
|
||||
|
|
|
@ -28,11 +28,17 @@ const itemVariants = cva(
|
|||
variant: 'default',
|
||||
className: 'bg-nav-item-select hover:bg-nav-item-select'
|
||||
},
|
||||
{
|
||||
active: false,
|
||||
disabled: true,
|
||||
variant: 'default',
|
||||
className: 'text-text-disabled! bg-transparent'
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
disabled: false,
|
||||
variant: 'emphasized',
|
||||
className: 'bg-nav-item-select hover:bg-nav-item-select'
|
||||
className: 'bg-nav-item-select hover:bg-nav-item-select '
|
||||
},
|
||||
{
|
||||
active: false,
|
||||
|
@ -56,8 +62,10 @@ export const SidebarItem: React.FC<ISidebarItem & VariantProps<typeof itemVarian
|
|||
|
||||
return (
|
||||
<ItemNode href={route} className={cn(itemVariants({ active, disabled, variant }))}>
|
||||
<span className="text-icon-size text-icon-color">{icon}</span>
|
||||
<span className="text-foreground truncate">{label}</span>
|
||||
<span className={cn('text-icon-size text-icon-color', { 'text-text-disabled': disabled })}>
|
||||
{icon}
|
||||
</span>
|
||||
<span className="truncate">{label}</span>
|
||||
</ItemNode>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue