diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2023-11-21 06:10:12 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2023-11-21 06:10:12 +0000 |
| commit | 0fc062268c71d53f8777c358b31e2a540d60d404 (patch) | |
| tree | 0183a00dcfb14583c7dfa80da082c21630afe375 /src-migrate/modules/register/components/TermCondition.tsx | |
| parent | 6ebe202147269100cd63ef125e877e8f693a27a1 (diff) | |
| parent | 6a6ce21e5a552b0dc6cd541710a87fd0a0fd9d20 (diff) | |
Merged in refactor/all (pull request #116)
Refactor/all
Diffstat (limited to 'src-migrate/modules/register/components/TermCondition.tsx')
| -rw-r--r-- | src-migrate/modules/register/components/TermCondition.tsx | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src-migrate/modules/register/components/TermCondition.tsx b/src-migrate/modules/register/components/TermCondition.tsx new file mode 100644 index 00000000..6b95ba19 --- /dev/null +++ b/src-migrate/modules/register/components/TermCondition.tsx @@ -0,0 +1,34 @@ +import { Checkbox } from '@chakra-ui/react' +import React from 'react' +import Modal from '~/common/components/elements/Modal' +import { useRegisterStore } from '~/common/stores/useRegisterStore' +import PageContent from '~/modules/page-content' + +const TermCondition = () => { + const { isOpenTNC, closeTNC, isCheckedTNC, toggleCheckTNC, openTNC } = useRegisterStore() + + return ( + <> + <div className="mt-4 flex items-center gap-x-2"> + <Checkbox id='tnc' name='tnc' isChecked={isCheckedTNC} onChange={toggleCheckTNC} /> + <div> + <label htmlFor="tnc" className="cursor-pointer">Dengan ini saya menyetujui</label> + {' '} + <span + className="font-medium text-danger-500 cursor-pointer" + onClick={openTNC} + > + syarat dan ketentuan + </span> + <label htmlFor="tnc" className="ml-2 cursor-pointer">yang berlaku</label> + </div> + </div> + + <Modal active={isOpenTNC} close={closeTNC} > + <PageContent path='/register#tnd' /> + </Modal> + </> + ) +} + +export default TermCondition
\ No newline at end of file |
