Skip to content

Commit

Permalink
X2-6577 PropTypes for Modal which wasn't present
Browse files Browse the repository at this point in the history
  • Loading branch information
rushi committed Sep 14, 2023
1 parent bc3f815 commit ac73681
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/components/Modal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ export const Modal = ({
);
};

Modal.propTypes = {
size: PropTypes.oneOfType(Object.keys(sizes)),
position: PropTypes.oneOfType(Object.keys(positions)),
isOpen: PropTypes.bool.isRequired,
shouldCloseOnOutsideClick: PropTypes.bool,
onClose: PropTypes.func.isRequired,
children: PropTypes.node.isRequired,
className: PropTypes.string,
};

const Header = ({ children, description, className, ...rest }) => {
return (
<Dialog.Title as="div" className={clsx(className, "ui-modal-header text-center")} {...rest}>
Expand Down

0 comments on commit ac73681

Please sign in to comment.