Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Stepper 컴포넌트를 구현해요. #65

Merged
merged 16 commits into from
Jul 5, 2024
Merged
Prev Previous commit
Next Next commit
fix: 코드리뷰 반영
eugene028 committed Jul 3, 2024
commit 51456ae07018e0b31575d055b28ff73a49cf932b
7 changes: 7 additions & 0 deletions packages/wow-ui/src/components/Stepper/index.tsx
Original file line number Diff line number Diff line change
@@ -23,6 +23,13 @@ const checkStepperStatus = (number: number, step: number) => {
return "default";
};

/**
* @param {number} step Stepper의 현재 스텝
* @param {number} [maxStep] Stepper가 가질 수 있는 최대 스텝
* @param {LabelType[]} [labels] Stepper에 하단에 입력할 라벨의 배열
* @param {number} width Stepper의 가로 길이를 자유롭게 정할 수 있어요. 단, 278px 이상이어야 합니다.
*/

const Stepper = ({ step, maxStep = 3, labels, width }: StepperProps) => {
const fillProgressBar = useCallback((maxStep: number, step: number) => {
const ratio = (step - 1) / (maxStep - 1);