-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #146 from bsideproject/moon
[feat] Step2 수정, Stepper Component 추가!
- Loading branch information
Showing
4 changed files
with
173 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.stepper_container { | ||
@apply flex items-center justify-center space-x-4; | ||
} | ||
|
||
.rounded { | ||
@apply w-[32px] h-[32px] rounded-full text-r1 flex items-center justify-center focus:outline-none; | ||
background: rgba(255, 142, 0, 0.10) | ||
} | ||
|
||
.disabled { | ||
@apply bg-g3 text-g0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React, { useState } from 'react'; | ||
import styles from './Stepper2.module.scss'; | ||
|
||
|
||
interface StepperProps { | ||
disabled ?: boolean | ||
} | ||
|
||
export default function Stepper2 ( { disabled }: StepperProps ) { | ||
const [count, setCount] = useState(1); | ||
|
||
return ( | ||
<div className={styles.stepper_container}> | ||
<button | ||
type="button" | ||
className={`${styles.rounded} ${disabled ? styles.disabled : ''} `} | ||
onClick={() => setCount(count - 1)} | ||
disabled={disabled} | ||
>- | ||
</button> | ||
<span className='font-bold text-g7'>{count}</span> | ||
<button | ||
type="button" | ||
className={`${styles.rounded} ${disabled ? styles.disabled : ''} `} | ||
onClick={() => setCount(count + 1)} | ||
disabled={disabled} | ||
>+</button> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters