Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion src/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { overwriteReadonlyProp } from "tsafe/lab/overwriteReadonlyProp";
export type ModalProps = {
className?: string;
/** Default: "medium" */
size?: "small" | "medium" | "large";
size?: "small" | "medium" | "large" | "full";
title: ReactNode;
titleAs?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "div";
titleProps?: React.DetailedHTMLProps<
Expand Down Expand Up @@ -81,6 +81,8 @@ const Modal = memo(
<div
className={(() => {
switch (size) {
case "full":
return fr.cx("fr-col-12", "fr-col-md-12", "fr-col-lg-12");
case "large":
return fr.cx("fr-col-12", "fr-col-md-10", "fr-col-lg-8");
case "small":
Expand Down
2 changes: 1 addition & 1 deletion stories/Modal.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ To create a Dialog component, something that you would use to ask the user a que
},
"size": {
"options": (() => {
const options = ["small", "medium", "large"] as const;
const options = ["small", "medium", "large", "full"] as const;

assert<Equals<typeof options[number] | undefined, ModalProps["size"]>>();

Expand Down