From 092833155193c07a0ae803beba7fb0b3480f12a1 Mon Sep 17 00:00:00 2001 From: Leeseojeong Date: Thu, 18 Jun 2026 23:05:30 +0900 Subject: [PATCH 1/8] =?UTF-8?q?=E2=9C=A8=20Feat:=20Spinner=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/shared/ui/spinner/Spinner.tsx | 41 +++++++++++++++++++++++++++++++ src/shared/ui/spinner/index.ts | 2 ++ 2 files changed, 43 insertions(+) create mode 100644 src/shared/ui/spinner/Spinner.tsx create mode 100644 src/shared/ui/spinner/index.ts diff --git a/src/shared/ui/spinner/Spinner.tsx b/src/shared/ui/spinner/Spinner.tsx new file mode 100644 index 0000000..a1be846 --- /dev/null +++ b/src/shared/ui/spinner/Spinner.tsx @@ -0,0 +1,41 @@ +import type { HTMLAttributes } from 'react'; + +import { cn } from '@/shared/styles/utils/cn'; + +type SpinnerProps = HTMLAttributes; + +/** + * ## Spinner + * + * @description + * 비동기 작업이 진행 중임을 시각적으로 표시하는 공통 로딩 컴포넌트입니다. + * 단독 상태 안내가 필요한 경우에는 스크린 리더용 문구를 별도로 제공합니다. + * + * ### 접근성 + * + * Spinner 자체는 장식 요소이므로 스크린 리더에서 제외됩니다. + * + * @param className - 크기와 색상 등 기본 스타일을 확장할 클래스 + * + * @example + * ```tsx + * + * + * 불러오는 중 + * + * ``` + */ +export default function Spinner({ className, ...props }: SpinnerProps) { + return ( +