From b17502005682c4eca0f55cdbff79ef7dbab451f0 Mon Sep 17 00:00:00 2001 From: JulesFILIOT Date: Tue, 2 Jun 2026 13:04:44 +0900 Subject: [PATCH] refactor(ui): extract shared download icon --- packages/ui/src/icons/download-icon.tsx | 36 +++++++++++++++++++ .../technology-stack/technology-stack.tsx | 20 ++--------- 2 files changed, 38 insertions(+), 18 deletions(-) create mode 100644 packages/ui/src/icons/download-icon.tsx diff --git a/packages/ui/src/icons/download-icon.tsx b/packages/ui/src/icons/download-icon.tsx new file mode 100644 index 0000000000..8ea6735c5f --- /dev/null +++ b/packages/ui/src/icons/download-icon.tsx @@ -0,0 +1,36 @@ +import type { CSSProperties, HTMLAttributes } from 'react' + +type DownloadIconProps = Omit, 'style'> & { + /** Uniform pixel size (width = height). Default 15. */ + size?: number + style?: CSSProperties +} + +export function DownloadIcon({ + size = 15, + className, + style, + ...rest +}: DownloadIconProps) { + const svgStyle = { + ...style, + width: size, + height: size, + } satisfies CSSProperties + + return ( + + ) +} diff --git a/packages/ui/src/primitives/technology-stack/technology-stack.tsx b/packages/ui/src/primitives/technology-stack/technology-stack.tsx index bfd017b09a..dd4d1edfd1 100644 --- a/packages/ui/src/primitives/technology-stack/technology-stack.tsx +++ b/packages/ui/src/primitives/technology-stack/technology-stack.tsx @@ -3,6 +3,8 @@ import { twMerge } from 'tailwind-merge' import { LogosMark } from '../../icons/logos-mark' +export { DownloadIcon } from '../../icons/download-icon' + type Tone = 'dark' | 'light' export type SectionMarkerProps = { @@ -19,24 +21,6 @@ export function SectionMarker({ label, className }: SectionMarkerProps) { ) } -export function DownloadIcon() { - return ( - - ) -} - export type TechDetailHeroItem = { title: string description?: string