Conversation
β Deploy Preview for ids-storybook ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
IRONAGE-Park
left a comment
There was a problem hiding this comment.
Contextλ‘ μ¬μ©νλ λ°©μμ μ₯μ μ΄ μμ§ μλΏμ§ μλ κ² κ°μ΅λλ€.
μΌλ¨, μ¬μ©μμ μ
μ₯μμ Alert μ»΄ν¬λνΈλ₯Ό μν΄ Providerλ₯Ό μ¬μ©ν΄μΌ νλ€λ μ κ³Ό, onConfirmμ΄ μ μΈλ μ΄ν λ°λμ Alertκ° λ«νκ² λμ΄ μ€κ° μμ
μ΄ νμν κ²½μ°(Alertλ₯Ό μ€μ²©ν΄μ λμ΄λ€κ±°λ)μ νμ₯μ±μ΄ λ«νμμ§ μμκΉ μκ°μ΄ λλλ€.
| background: ${({ theme }) => theme.color.primary.blue500}; | ||
| border: none; | ||
| border-radius: 5px; | ||
| color: white; |
There was a problem hiding this comment.
μ»¬λ¬ μ½λλ λμμΈ μμ€ν μΌλ‘ ν΅μΌνλκ² μ’μ κ² κ°μ΅λλ€.
| description: '', | ||
| confirmButtonLabel: 'νμΈ', | ||
| // eslint-disable-next-line @typescript-eslint/no-empty-function | ||
| onConfirm: () => {}, |
There was a problem hiding this comment.
μ΄μ°¨νΌ μ΅μ λ μΈμλΌλ©΄ λ°λμ μ΄κΈ° μνλ‘ λ£μ΄μ€ νμλ μμ κ² κ°μ΅λλ€.
| alert.onConfirm(); | ||
| } | ||
|
|
||
| setAlert((prev) => ({ ...prev, open: false })); |
There was a problem hiding this comment.
μ΄ κ²½μ°μ, λ§μ½ μ΄μ μνμμ description, confirmButtonLabel λ±μ μ΅μ
λ μΈμλ₯Ό μ΄κΈ°ν ν΄μ£Όμ§ μμΌλ©΄, ν΄λΉ λ΄μ©μ μ΄νμ λ³κ²½ν΄μ£Όμ§ μκ³ μ¬μ©ν λ μ΄μ κΈ°λ‘μ΄ λ¨μμμ κ² κ°μ΅λλ€.
| const openAlert = useContext(AlertContext); | ||
|
|
||
| return useCallback( | ||
| (title: string, description: string, onConfirm?: () => void, confirmButtonLabel?: string) => { |
There was a problem hiding this comment.
μ΅μ
λ μΈμλ€μ μμμ μν₯μ λ°μ§ μλλ‘ κ°μ²΄λ‘ λ¬Άμ΄μ μ¬μ©νλ©΄ μ’μ κ² κ°μ΅λλ€.
λ§μ½ onClose λ±μ ν¨μκ° μΆκ°λλ€λ©΄ λͺ¨λ μ½λμμ μμλ₯Ό λ³κ²½ν΄μΌ νλ―λ‘ μ΄λ €μμ΄ λ°μν κ² κ°λ€μ.
κ°μ π
μμ λ΄μ© π
κΈ°ν μ¬ν πββοΈ