summaryrefslogtreecommitdiff
path: root/src-migrate/modules/register/components/TermCondition.tsx
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-10-30 09:21:30 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-10-30 09:21:30 +0700
commite8c414325a1e32474e740cc6e7dca8396affc5e3 (patch)
treee84feb31cd8619d208b4558c5fcf30becc5337e0 /src-migrate/modules/register/components/TermCondition.tsx
parent1694c12f75ad06c5e40d6f9a66e245c3e683146c (diff)
parentc82110f7d3a2f85de99045fde7b579e369f15b2c (diff)
Merge branch 'refactor/all' into development
Diffstat (limited to 'src-migrate/modules/register/components/TermCondition.tsx')
-rw-r--r--src-migrate/modules/register/components/TermCondition.tsx34
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..aaba6604
--- /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' checked={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