From c26fc3cec30270f6572b0fe337297043650247c1 Mon Sep 17 00:00:00 2001 From: Tomas Francisco <4301103+tomasfrancisco@users.noreply.github.com> Date: Fri, 1 Nov 2024 15:57:40 +0100 Subject: [PATCH] chore: run lint and format --- packages/components/src/alert/alert.tsx | 2 +- .../src/collapsible/collapsible.tsx | 12 +- packages/components/src/hooks/use-mobile.tsx | 24 +-- .../src/navigation-menu/navigation-menu.tsx | 2 +- packages/components/src/toaster/toast.tsx | 2 +- packages/components/tailwind.config.cjs | 180 +++++++++--------- 6 files changed, 112 insertions(+), 110 deletions(-) diff --git a/packages/components/src/alert/alert.tsx b/packages/components/src/alert/alert.tsx index 25e33f30..25c27088 100644 --- a/packages/components/src/alert/alert.tsx +++ b/packages/components/src/alert/alert.tsx @@ -5,7 +5,7 @@ import { Slot } from '@radix-ui/react-slot'; import { cn } from '@/utils'; const alertVariants = cva( - 'ds-relative ds-w-full ds-rounded-lg ds-border ds-p-4 [&>svg~*]:ds-pl-7 [&>svg+div]:ds-translate-y-[-3px] [&>svg]:ds-absolute [&>svg]:ds-left-4 [&>svg]:ds-top-4 [&>svg]:ds-text-foreground', + 'ds-relative ds-w-full ds-rounded-lg ds-border ds-p-4 [&>svg+div]:ds-translate-y-[-3px] [&>svg]:ds-absolute [&>svg]:ds-left-4 [&>svg]:ds-top-4 [&>svg]:ds-text-foreground [&>svg~*]:ds-pl-7', { variants: { variant: { diff --git a/packages/components/src/collapsible/collapsible.tsx b/packages/components/src/collapsible/collapsible.tsx index 9fa48946..86ab87d8 100644 --- a/packages/components/src/collapsible/collapsible.tsx +++ b/packages/components/src/collapsible/collapsible.tsx @@ -1,11 +1,11 @@ -"use client" +'use client'; -import * as CollapsiblePrimitive from "@radix-ui/react-collapsible" +import * as CollapsiblePrimitive from '@radix-ui/react-collapsible'; -const Collapsible = CollapsiblePrimitive.Root +const Collapsible = CollapsiblePrimitive.Root; -const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger +const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger; -const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent +const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent; -export { Collapsible, CollapsibleTrigger, CollapsibleContent } +export { Collapsible, CollapsibleTrigger, CollapsibleContent }; diff --git a/packages/components/src/hooks/use-mobile.tsx b/packages/components/src/hooks/use-mobile.tsx index 2b0fe1df..6be5f6c1 100644 --- a/packages/components/src/hooks/use-mobile.tsx +++ b/packages/components/src/hooks/use-mobile.tsx @@ -1,19 +1,21 @@ -import * as React from "react" +import * as React from 'react'; -const MOBILE_BREAKPOINT = 768 +const MOBILE_BREAKPOINT = 768; export function useIsMobile() { - const [isMobile, setIsMobile] = React.useState(undefined) + const [isMobile, setIsMobile] = React.useState( + undefined + ); React.useEffect(() => { - const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`) + const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`); const onChange = () => { - setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) - } - mql.addEventListener("change", onChange) - setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) - return () => mql.removeEventListener("change", onChange) - }, []) + setIsMobile(window.innerWidth < MOBILE_BREAKPOINT); + }; + mql.addEventListener('change', onChange); + setIsMobile(window.innerWidth < MOBILE_BREAKPOINT); + return () => mql.removeEventListener('change', onChange); + }, []); - return !!isMobile + return !!isMobile; } diff --git a/packages/components/src/navigation-menu/navigation-menu.tsx b/packages/components/src/navigation-menu/navigation-menu.tsx index 4ab44ced..6072a925 100644 --- a/packages/components/src/navigation-menu/navigation-menu.tsx +++ b/packages/components/src/navigation-menu/navigation-menu.tsx @@ -55,7 +55,7 @@ const NavigationMenuTrigger = React.forwardRef< {children}{' '}