Skip to content

Commit

Permalink
make the modal classNames optional
Browse files Browse the repository at this point in the history
  • Loading branch information
tareq1988 committed Sep 15, 2023
1 parent 0e5cf7c commit 6aa5c81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,19 @@ const Modal = ({ isOpen, onClose, maxWidth = 'lg', children }: PropsWithChildren
);
};

const ModalHeader = ({ children, className }: PropsWithChildren<{ className: string }>) => {
const ModalHeader = ({ children, className }: PropsWithChildren<{ className?: string }>) => {
return (
<div className={classNames('text-lg font-medium text-gray-900 mb-4 px-5 pt-5', className)}>
{children}
</div>
);
};

const ModalBody = ({ children, className }: PropsWithChildren<{ className: string }>) => {
const ModalBody = ({ children, className }: PropsWithChildren<{ className?: string }>) => {
return <div className={classNames('px-5 pt-0', className)}>{children}</div>;
};

const ModalActions = ({ children, className }: PropsWithChildren<{ className: string }>) => {
const ModalActions = ({ children, className }: PropsWithChildren<{ className?: string }>) => {
return (
<div className={classNames('px-5 py-4 mt-4 sm:px-6 sm:flex sm:flex-row-reverse', className)}>
{children}
Expand Down

0 comments on commit 6aa5c81

Please sign in to comment.