Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add modal nested customClass #292

Merged
merged 1 commit into from
Jul 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/components/PopupModal/PopupModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface IPopupModalProps extends ComponentPropsWithoutRef<'div'> {
fullMode?: boolean;
children?: ReactNode;
customClass?: string;
customClassNested?: string;
// both exposed function should be declared as:
// onOpen?(): any;
// however by some reason jest does not recognize
Expand Down Expand Up @@ -102,6 +103,7 @@ export function PopupModal(props: IPopupModalProps) {
onOpen,
onClose,
customClass,
customClassNested,
...rest
} = props;
const [hidden, setHidden] = useState(status);
Expand Down Expand Up @@ -136,7 +138,9 @@ export function PopupModal(props: IPopupModalProps) {
{...rest}
>
<div className={`relative max-h-full w-2/3 ${customClass}`}>
<div className="relative bg-primary rounded-lg shadow">
<div
className={`relative bg-primary rounded-lg shadow ${customClassNested}`}
>
{appendedChildren}
</div>
</div>
Expand Down