Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
woo-jk committed Jul 22, 2024
1 parent 3c2e350 commit 21f8294
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 190 deletions.
4 changes: 2 additions & 2 deletions src/app/(sidebar)/(my-info)/components/InfoCardItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
Expand All @@ -29,7 +29,7 @@ export function InfoCardItem({ title, updatedDate, cardTagList }: Props) {
<div>
<DropdownMenu>
<DropdownMenuTrigger asChild>
<button className="rounded-[4px] hover:bg-neutral-1">
<button className="rounded-[4px] hover:bg-neutral-1" aria-label="more button">
<Icon name="more" color="#1B1C1E" />
</button>
</DropdownMenuTrigger>
Expand Down
8 changes: 4 additions & 4 deletions src/system/components/Icon/SVG/Delete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ export function Delete({ size, color }: IconBaseType) {
<path
d="M4.62598 7.40259H19.3736L18.0473 21.25H5.95222L4.62598 7.40259Z"
stroke={color}
stroke-width="1.5"
stroke-linecap="square"
strokeWidth="1.5"
strokeLinecap="square"
/>
<path d="M7.81177 2.75H16.1884" stroke={color} stroke-width="1.5" stroke-linecap="square" />
<path d="M12 11.9995L12 16.6525" stroke={color} stroke-width="1.5" stroke-linecap="square" />
<path d="M7.81177 2.75H16.1884" stroke={color} strokeWidth="1.5" strokeLinecap="square" />
<path d="M12 11.9995L12 16.6525" stroke={color} strokeWidth="1.5" strokeLinecap="square" />
</svg>
);
}
4 changes: 2 additions & 2 deletions src/system/components/Icon/SVG/Pip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { IconBaseType } from './type';
export function Pip({ size, color }: IconBaseType) {
return (
<svg width={size} height={size} viewBox={`0 0 ${size} ${size}`} fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.9746 4.97484H19.0249V13.42V19.0252H13.4198H4.9746V4.97484Z" stroke={color} stroke-width="1.22556" />
<path d="M4.9746 4.97484H19.0249V13.42V19.0252H13.4198H4.9746V4.97484Z" stroke={color} strokeWidth="1.22556" />
<path
d="M11.9453 11.9455H16.3052V14.6447V16.3055H14.6445H11.9453V11.9455Z"
fill={color}
stroke={color}
stroke-width="1.22556"
strokeWidth="1.22556"
/>
</svg>
);
Expand Down
69 changes: 69 additions & 0 deletions src/system/components/ui/DropdownMenu.tsx
Original file line number Diff line number Diff line change
@@ -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<typeof DropdownMenuPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
>(({ className, sideOffset = 4, ...props }, ref) => (
<DropdownMenuPrimitive.Portal>
<DropdownMenuPrimitive.Content
ref={ref}
sideOffset={sideOffset}
className={cn(
'z-50 min-w-[8rem] overflow-hidden rounded-[12px] bg-white p-1 text-slate-950 shadow-[0px_2px_8px_0px_rgba(99,99,99,0.20)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50',
className,
)}
{...props}
/>
</DropdownMenuPrimitive.Portal>
));
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;

const DropdownMenuItem = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
inset?: boolean;
}
>(({ className, inset, ...props }, ref) => (
<DropdownMenuPrimitive.Item
ref={ref}
className={cn(
'relative flex cursor-default select-none items-center rounded-[12px] py-[12px] pl-[12px] pr-[16px] text-sm outline-none transition-colors focus:bg-slate-100 focus:text-slate-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-slate-800 dark:focus:text-slate-50',
inset && 'pl-8',
className,
)}
{...props}
/>
));
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;

const DropdownMenuSeparator = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
>(({ className, ...props }, ref) => (
<DropdownMenuPrimitive.Separator
ref={ref}
className={cn('-mx-1 my-1 h-px bg-slate-100 dark:bg-slate-800', className)}
{...props}
/>
));
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;

export {
DropdownMenu,
DropdownMenuTrigger,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuSeparator,
DropdownMenuGroup,
};
182 changes: 0 additions & 182 deletions src/system/components/ui/dropdown-menu.tsx

This file was deleted.

0 comments on commit 21f8294

Please sign in to comment.