-
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 #67 from Try-AngIe/feat/simpconsent
feat/simpconsent: 간편서명동의 설정 프론트 구현, 서명이미지 S3 연동
- Loading branch information
Showing
15 changed files
with
657 additions
and
57 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Switch } from '@headlessui/react'; | ||
import { AiOutlineCheck } from 'react-icons/ai'; | ||
|
||
const Checkbox = ({ label, name, checked, onChange, disabled }) => { | ||
return ( | ||
<Switch.Group> | ||
<div className='flex items-center'> | ||
<Switch | ||
checked={checked} | ||
onChange={onChange} | ||
name={name} | ||
disabled={disabled} | ||
className={`relative flex h-5 w-5 items-center justify-center rounded outline-none ring-1 transition-all duration-200 ${!checked && !disabled ? 'bg-white ring-gray-300' : ''} ${checked && !disabled ? 'bg-teal-400 ring-teal-400' : ''} ${disabled ? 'bg-gray-200 ring-gray-200' : ''} `}> | ||
<AiOutlineCheck | ||
size='0.75rem' | ||
className={` ${checked ? 'scale-100' : 'scale-0'} ${checked && !disabled ? 'text-white' : 'text-gray-400'} transition-transform duration-200 ease-out`} | ||
/> | ||
</Switch> | ||
<Switch.Label className='ml-2'>{label}</Switch.Label> | ||
</div> | ||
</Switch.Group> | ||
); | ||
}; | ||
|
||
export default Checkbox; |
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
Oops, something went wrong.