>(({ className, ...props }, ref) => {
+const SidebarFooter = React.forwardRef<
+ HTMLDivElement,
+ React.ComponentProps<'div'>
+>(({ className, ...props }, ref) => {
return (
, React.ComponentProps>(({ className, ...props }, ref) => {
+const SidebarSeparator = React.forwardRef<
+ React.ElementRef,
+ React.ComponentProps
+>(({ className, ...props }, ref) => {
return (
, Re
});
SidebarSeparator.displayName = 'SidebarSeparator';
-const SidebarContent = React.forwardRef>(({ className, ...props }, ref) => {
+const SidebarContent = React.forwardRef<
+ HTMLDivElement,
+ React.ComponentProps<'div'>
+>(({ className, ...props }, ref) => {
return (
);
});
SidebarContent.displayName = 'SidebarContent';
-const SidebarGroup = React.forwardRef>(({ className, ...props }, ref) => {
+const SidebarGroup = React.forwardRef<
+ HTMLDivElement,
+ React.ComponentProps<'div'>
+>(({ className, ...props }, ref) => {
return (
& { asChild?: boolean }>(({ className, asChild = false, ...props }, ref) => {
+const SidebarGroupLabel = React.forwardRef<
+ HTMLDivElement,
+ React.ComponentProps<'div'> & { asChild?: boolean }
+>(({ className, asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : 'div';
return (
@@ -376,7 +459,10 @@ const SidebarGroupLabel = React.forwardRef & { asChild?: boolean }>(({ className, asChild = false, ...props }, ref) => {
+const SidebarGroupAction = React.forwardRef<
+ HTMLButtonElement,
+ React.ComponentProps<'button'> & { asChild?: boolean }
+>(({ className, asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : 'button';
return (
@@ -396,7 +482,10 @@ const SidebarGroupAction = React.forwardRef>(({ className, ...props }, ref) => (
+const SidebarGroupContent = React.forwardRef<
+ HTMLDivElement,
+ React.ComponentProps<'div'>
+>(({ className, ...props }, ref) => (
>(({ className, ...props }, ref) => (
+const SidebarMenu = React.forwardRef<
+ HTMLUListElement,
+ React.ComponentProps<'ul'>
+>(({ className, ...props }, ref) => (
- >(({ className, ...props }, ref) => (
+const SidebarMenuItem = React.forwardRef<
+ HTMLLIElement,
+ React.ComponentProps<'li'>
+>(({ className, ...props }, ref) => (
- ;
} & VariantProps
->(({ asChild = false, isActive = false, variant = 'default', size = 'default', tooltip, className, ...props }, ref) => { - const Comp = asChild ? Slot : 'button'; - const { isMobile, state } = useSidebar(); +>( + ( + { + asChild = false, + isActive = false, + variant = 'default', + size = 'default', + tooltip, + className, + ...props + }, + ref, + ) => { + const Comp = asChild ? Slot : 'button'; + const { isMobile, state } = useSidebar(); - const button = ( - - ); + const button = ( + + ); - if (!tooltip) { - return button; - } + if (!tooltip) { + return button; + } - if (typeof tooltip === 'string') { - tooltip = { - children: tooltip, - }; - } + if (typeof tooltip === 'string') { + tooltip = { + children: tooltip, + }; + } - return ( - - - ); -}); + return ( +{button} -- + + ); + }, +); SidebarMenuButton.displayName = 'SidebarMenuButton'; const SidebarMenuAction = React.forwardRef< @@ -525,7 +633,10 @@ const SidebarMenuAction = React.forwardRef< }); SidebarMenuAction.displayName = 'SidebarMenuAction'; -const SidebarMenuBadge = React.forwardRef{button} ++ >(({ className, ...props }, ref) => ( +const SidebarMenuBadge = React.forwardRef< + HTMLDivElement, + React.ComponentProps<'div'> +>(({ className, ...props }, ref) => ( >(({ className, ...props }, ref) => ( +const SidebarMenuSub = React.forwardRef< + HTMLUListElement, + React.ComponentProps<'ul'> +>(({ className, ...props }, ref) => (>(({ ...props }, ref) => ( +const SidebarMenuSubItem = React.forwardRef< + HTMLLIElement, + React.ComponentProps<'li'> +>(({ ...props }, ref) => (