mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-16 17:51:43 +10:00
- implement actions section
This commit is contained in:
@ -9,7 +9,7 @@ import { handleKeyUp } from '../utils';
|
||||
import styles from './BaseModal.module.css';
|
||||
|
||||
const BaseModal = forwardRef(
|
||||
({ title, state, children, action, onDestroy }, ref) => {
|
||||
({ title, state, children, action, hideActions = false, onDestroy }, ref) => {
|
||||
const [open, setOpen] = state;
|
||||
|
||||
const handleClose = () => {
|
||||
@ -44,16 +44,15 @@ const BaseModal = forwardRef(
|
||||
|
||||
<div className={styles.body}>{children}</div>
|
||||
|
||||
<div className={styles.actions}>
|
||||
<Button
|
||||
outline
|
||||
title="Cancel"
|
||||
className="mr-8"
|
||||
onClick={handleClose}
|
||||
/>
|
||||
{!hideActions && (
|
||||
<div className={styles.actions}>
|
||||
<Button outline className="mr-8" onClick={handleClose}>
|
||||
Cancel
|
||||
</Button>
|
||||
|
||||
{action}
|
||||
</div>
|
||||
{action}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</Fade>
|
||||
</Modal>
|
||||
|
||||
Reference in New Issue
Block a user