diff --git a/src/components/Badge/Badge.module.css b/src/components/Badge/Badge.module.css index 3ef0dfe..330aa87 100644 --- a/src/components/Badge/Badge.module.css +++ b/src/components/Badge/Badge.module.css @@ -7,6 +7,7 @@ border: 1px solid transparent; border-radius: 13px; font-size: 12px; + line-height: 1; overflow: hidden; text-decoration: none; } diff --git a/src/components/Badge/Badge.tsx b/src/components/Badge/Badge.tsx index 5cdb260..fe83d4b 100644 --- a/src/components/Badge/Badge.tsx +++ b/src/components/Badge/Badge.tsx @@ -28,8 +28,11 @@ export function Badge({ () => (color ? ({ "--badge": color } as CSSProperties) : undefined), [color], ); + + const Component = props.onClick ? "button" : "span"; + return ( - + ); } diff --git a/src/components/ItemList/ItemList.module.css b/src/components/ItemList/ItemList.module.css index 7299129..5ac0b4c 100644 --- a/src/components/ItemList/ItemList.module.css +++ b/src/components/ItemList/ItemList.module.css @@ -29,3 +29,11 @@ opacity: 1; } } + +.isSmall { + font-size: 14px; + + .link { + padding: 8px; + } +} diff --git a/src/components/ItemList/ItemList.tsx b/src/components/ItemList/ItemList.tsx index 30954b4..e70a678 100644 --- a/src/components/ItemList/ItemList.tsx +++ b/src/components/ItemList/ItemList.tsx @@ -6,14 +6,25 @@ import { FlagBadge } from "@/components/Badge/Badge"; import { Item } from "@/lib/types"; import { cn } from "@/lib/utils"; -interface ItemListProps { +export interface ItemListProps { items: Item[]; activeId?: string; + size?: "small" | "default"; + className?: string; } -export function ItemList({ items, activeId }: ItemListProps) { +export function ItemList({ + items, + activeId, + size = "default", + className, +}: ItemListProps) { return ( -