From 21f8294b8d368ac8fc266071e8d6c88384b002a1 Mon Sep 17 00:00:00 2001 From: woo-jk Date: Tue, 23 Jul 2024 03:56:55 +0900 Subject: [PATCH] lint --- .../(my-info)/components/InfoCardItem.tsx | 4 +- src/system/components/Icon/SVG/Delete.tsx | 8 +- src/system/components/Icon/SVG/Pip.tsx | 4 +- src/system/components/ui/DropdownMenu.tsx | 69 +++++++ src/system/components/ui/dropdown-menu.tsx | 182 ------------------ 5 files changed, 77 insertions(+), 190 deletions(-) create mode 100644 src/system/components/ui/DropdownMenu.tsx delete mode 100644 src/system/components/ui/dropdown-menu.tsx diff --git a/src/app/(sidebar)/(my-info)/components/InfoCardItem.tsx b/src/app/(sidebar)/(my-info)/components/InfoCardItem.tsx index 3f98eaf2..c9afd35c 100644 --- a/src/app/(sidebar)/(my-info)/components/InfoCardItem.tsx +++ b/src/app/(sidebar)/(my-info)/components/InfoCardItem.tsx @@ -6,7 +6,7 @@ import { DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, -} from '@/system/components/ui/dropdown-menu'; +} from '@/system/components/ui/DropdownMenu'; import { InfoCard } from '@/types/info'; interface Props extends InfoCard {} @@ -29,7 +29,7 @@ export function InfoCardItem({ title, updatedDate, cardTagList }: Props) {
- diff --git a/src/system/components/Icon/SVG/Delete.tsx b/src/system/components/Icon/SVG/Delete.tsx index 6cee138b..535799c3 100644 --- a/src/system/components/Icon/SVG/Delete.tsx +++ b/src/system/components/Icon/SVG/Delete.tsx @@ -6,11 +6,11 @@ export function Delete({ size, color }: IconBaseType) { - - + + ); } diff --git a/src/system/components/Icon/SVG/Pip.tsx b/src/system/components/Icon/SVG/Pip.tsx index e837a53c..f41fa65c 100644 --- a/src/system/components/Icon/SVG/Pip.tsx +++ b/src/system/components/Icon/SVG/Pip.tsx @@ -3,12 +3,12 @@ import { IconBaseType } from './type'; export function Pip({ size, color }: IconBaseType) { return ( - + ); diff --git a/src/system/components/ui/DropdownMenu.tsx b/src/system/components/ui/DropdownMenu.tsx new file mode 100644 index 00000000..b9a43e3d --- /dev/null +++ b/src/system/components/ui/DropdownMenu.tsx @@ -0,0 +1,69 @@ +'use client'; + +import * as React from 'react'; +import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'; + +import { cn } from '@/utils/tailwind-util'; + +const DropdownMenu = DropdownMenuPrimitive.Root; + +const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger; + +const DropdownMenuGroup = DropdownMenuPrimitive.Group; + +const DropdownMenuContent = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, sideOffset = 4, ...props }, ref) => ( + + + +)); +DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName; + +const DropdownMenuItem = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef & { + inset?: boolean; + } +>(({ className, inset, ...props }, ref) => ( + +)); +DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName; + +const DropdownMenuSeparator = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName; + +export { + DropdownMenu, + DropdownMenuTrigger, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuGroup, +}; diff --git a/src/system/components/ui/dropdown-menu.tsx b/src/system/components/ui/dropdown-menu.tsx deleted file mode 100644 index 40a5bbb0..00000000 --- a/src/system/components/ui/dropdown-menu.tsx +++ /dev/null @@ -1,182 +0,0 @@ -'use client'; - -import * as React from 'react'; -import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'; -import { Check, ChevronRight, Circle } from 'lucide-react'; - -import { cn } from '@/utils/tailwind-util'; - -const DropdownMenu = DropdownMenuPrimitive.Root; - -const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger; - -const DropdownMenuGroup = DropdownMenuPrimitive.Group; - -const DropdownMenuPortal = DropdownMenuPrimitive.Portal; - -const DropdownMenuSub = DropdownMenuPrimitive.Sub; - -const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup; - -const DropdownMenuSubTrigger = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef & { - inset?: boolean; - } ->(({ className, inset, children, ...props }, ref) => ( - - {children} - - -)); -DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName; - -const DropdownMenuSubContent = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, ...props }, ref) => ( - -)); -DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName; - -const DropdownMenuContent = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, sideOffset = 4, ...props }, ref) => ( - - - -)); -DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName; - -const DropdownMenuItem = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef & { - inset?: boolean; - } ->(({ className, inset, ...props }, ref) => ( - -)); -DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName; - -const DropdownMenuCheckboxItem = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, children, checked, ...props }, ref) => ( - - - - - - - {children} - -)); -DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName; - -const DropdownMenuRadioItem = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, children, ...props }, ref) => ( - - - - - - - {children} - -)); -DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName; - -const DropdownMenuLabel = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef & { - inset?: boolean; - } ->(({ className, inset, ...props }, ref) => ( - -)); -DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName; - -const DropdownMenuSeparator = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, ...props }, ref) => ( - -)); -DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName; - -const DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes) => { - return ; -}; -DropdownMenuShortcut.displayName = 'DropdownMenuShortcut'; - -export { - DropdownMenu, - DropdownMenuTrigger, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuCheckboxItem, - DropdownMenuRadioItem, - DropdownMenuLabel, - DropdownMenuSeparator, - DropdownMenuShortcut, - DropdownMenuGroup, - DropdownMenuPortal, - DropdownMenuSub, - DropdownMenuSubContent, - DropdownMenuSubTrigger, - DropdownMenuRadioGroup, -};