-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated Modals and Minor UI Changes (#186)
* refactor: minor ui update * feat: add modals for terms&conditions and code of conduct
- Loading branch information
1 parent
48ba317
commit 6d3e510
Showing
8 changed files
with
170 additions
and
13 deletions.
There are no files selected for viewing
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
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
47 changes: 47 additions & 0 deletions
47
src/components/Marginals/Footer/ModalComponents/CodeOfConductModal.jsx
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,47 @@ | ||
import { Modal, ModalContent, ModalBody, Button } from '@nextui-org/react'; | ||
import { Fragment } from 'react'; | ||
import { closeIcon, CodeOfConductModalData } from '@/config/content/Footer'; | ||
import Image from 'next/image'; | ||
import { ModalText, Para } from '../styles'; | ||
|
||
export const CodeOfConductModal = ({ isOpen, onClose }) => { | ||
return ( | ||
<Modal | ||
size='lg' | ||
isOpen={isOpen} | ||
onClose={onClose} | ||
backdrop='opaque' | ||
hideCloseButton={true} | ||
placement='center' | ||
className='backdrop-blur-2xl border-2 border-[#00FFD1] p-5' | ||
scrollBehavior='inside' | ||
> | ||
<ModalContent className='relative bg-[#0000002a] max-h-[60vh] overflow-y-auto p-5'> | ||
<Button | ||
color='danger' | ||
variant='light' | ||
onPress={onClose} | ||
className='absolute top-3 right-3 z-10' | ||
> | ||
<Image src={closeIcon} alt='close' width={30} height={30} /> | ||
</Button> | ||
<ModalBody className='w-full h-full flex flex-col justify-start items-start overflow-y-auto py-8'> | ||
{CodeOfConductModalData.map((items, index) => ( | ||
<div key={index} className='w-full mb-4'> | ||
<ModalText>{items.title}</ModalText> | ||
<Para className='mt-2'> | ||
{items.description.split('•').map((part, index) => ( | ||
<Fragment key={index}> | ||
{part} | ||
{index < items.description.split('•').length - 1 && <br />} | ||
{index < items.description.split('•').length - 1 && '•'} | ||
</Fragment> | ||
))} | ||
</Para> | ||
</div> | ||
))} | ||
</ModalBody> | ||
</ModalContent> | ||
</Modal> | ||
); | ||
}; |
2 changes: 1 addition & 1 deletion
2
src/components/Marginals/Footer/MapModal.jsx → ...inals/Footer/ModalComponents/MapModal.jsx
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
2 changes: 1 addition & 1 deletion
2
...s/Marginals/Footer/PaymentPolicyModel.jsx → ...er/ModalComponents/PaymentPolicyModel.jsx
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
47 changes: 47 additions & 0 deletions
47
src/components/Marginals/Footer/ModalComponents/TermAndConditionsModal.jsx
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,47 @@ | ||
import { Modal, ModalContent, ModalBody, Button } from '@nextui-org/react'; | ||
import { closeIcon, TermsAndConditionsModalData } from '@/config/content/Footer'; | ||
import { Fragment } from 'react'; | ||
import Image from 'next/image'; | ||
import { ModalText, Para } from '../styles'; | ||
|
||
export const TermAndConditionModal = ({ isOpen, onClose }) => { | ||
return ( | ||
<Modal | ||
size='lg' | ||
isOpen={isOpen} | ||
onClose={onClose} | ||
backdrop='opaque' | ||
hideCloseButton={true} | ||
placement='center' | ||
className='backdrop-blur-2xl border-2 border-[#00FFD1] p-5' | ||
scrollBehavior='inside' | ||
> | ||
<ModalContent className='relative bg-[#0000002a] max-h-[60vh] overflow-y-auto p-5'> | ||
<Button | ||
color='danger' | ||
variant='light' | ||
onPress={onClose} | ||
className='absolute top-3 right-3 z-10' | ||
> | ||
<Image src={closeIcon} alt='close' width={30} height={30} /> | ||
</Button> | ||
<ModalBody className='w-full py-8 text-monteserrat h-full flex flex-col justify-start items-start overflow-y-auto'> | ||
{TermsAndConditionsModalData.map((items, index) => ( | ||
<div key={index} className='w-full mb-4'> | ||
<ModalText>{items.title}</ModalText> | ||
<Para className='mt-2'> | ||
{items.description.split('●').map((part, index) => ( | ||
<Fragment key={index}> | ||
{part} | ||
{index < items.description.split('●').length - 1 && <br />} | ||
{index < items.description.split('●').length - 1 && '●'} | ||
</Fragment> | ||
))} | ||
</Para> | ||
</div> | ||
))} | ||
</ModalBody> | ||
</ModalContent> | ||
</Modal> | ||
); | ||
}; |
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