File tree Expand file tree Collapse file tree 3 files changed +18
-19
lines changed
Expand file tree Collapse file tree 3 files changed +18
-19
lines changed Original file line number Diff line number Diff line change 1- import {
2- IcCheckOff ,
3- IcCheckOn ,
4- IcCheckboxOff ,
5- IcCheckboxOn ,
6- } from '@/assets/IconList'
1+ import { IcCheck , IcCheckboxOn } from '@/assets/IconList'
72import clsx from 'clsx'
83import { twMerge } from 'tailwind-merge'
94
@@ -26,18 +21,23 @@ export const CheckboxInput = ({
2621 ...props
2722} : CheckboxInputProps ) : JSX . Element => {
2823 const getCheckboxIcon = ( checked : boolean ) => {
29- return checked ? (
30- < IcCheckboxOn width = { 24 } height = { 24 } alt = '체크된 체크박스' />
31- ) : (
32- < IcCheckboxOff width = { 24 } height = { 24 } alt = '체크 안 된 체크박스' />
24+ const checkBoxClass = clsx (
25+ 'flex h-20 w-20 items-center justify-center rounded-3 border-[1.4px] border-solid border-gray-300' ,
26+ { 'border-0 bg-primary-normal' : checked }
27+ )
28+ const checkClass = 'text-common-white'
29+ return (
30+ < div className = { checkBoxClass } >
31+ < IcCheckboxOn className = { checkClass } alt = '체크된 체크박스' />
32+ </ div >
3333 )
3434 }
3535
3636 const getCheckIcon = ( checked : boolean ) => {
37- return checked ? (
38- < IcCheckOn width = { 24 } height = { 24 } alt = '체크된 체크' />
39- ) : (
40- < IcCheckOff width = { 24 } height = { 24 } alt = '체크 안 된 체크' />
37+ const checkClass = clsx ( 'text-gray-300' , { 'text-primary-normal' : checked } )
38+ const checkAlt = checked ? '체크된 체크' : '체크 안 된 체크'
39+ return (
40+ < IcCheck width = { 24 } height = { 24 } className = { checkClass } alt = { checkAlt } />
4141 )
4242 }
4343
You can’t perform that action at this time.
0 commit comments