diff --git a/packages/calcite-components/src/components/modal/modal.scss b/packages/calcite-components/src/components/modal/modal.scss index 00cb5216cbf..097078288b1 100644 --- a/packages/calcite-components/src/components/modal/modal.scss +++ b/packages/calcite-components/src/components/modal/modal.scss @@ -265,14 +265,14 @@ slot[name="primary"] { * Sizes */ @mixin modal-size($size, $width) { - :host([width="#{$size}"]) .modal { + :host([width-scale="#{$size}"]) .modal { @apply max-h-full max-w-full; inline-size: var(--calcite-modal-width, $width); block-size: var(--calcite-modal-height, auto); } @media screen and (max-width: $width + 2 * $baseline) { - :host([width="#{$size}"]) { + :host([width-scale="#{$size}"]) { .modal { @apply m-0 h-full max-h-full w-full max-w-full; } @@ -281,7 +281,7 @@ slot[name="primary"] { max-block-size: unset; } } - :host([width="#{$size}"][docked]) .container { + :host([width-scale="#{$size}"][docked]) .container { align-items: flex-end; } } diff --git a/packages/calcite-components/src/components/modal/modal.stories.ts b/packages/calcite-components/src/components/modal/modal.stories.ts index 1b336372c26..5892bd26983 100644 --- a/packages/calcite-components/src/components/modal/modal.stories.ts +++ b/packages/calcite-components/src/components/modal/modal.stories.ts @@ -20,7 +20,7 @@ export const simple = (): string => html` ${boolean("open", true)} kind="${select("kind", ["brand", "danger", "info", "success", "warning"], "")}" scale="${select("scale", ["s", "m", "l"], "m")}" - width="${select("width", ["s", "m", "l"], "s")}" + width-scale="${select("width-scale", ["s", "m", "l"], "s")}" ${boolean("fullscreen", false)} ${boolean("docked", false)} ${boolean("escape-disabled", false)} @@ -52,7 +52,7 @@ export const slots = (): string => html` ${boolean("open", true)} kind="${select("kind", ["brand", "danger", "info", "success", "warning"], "")}" scale="${select("scale", ["s", "m", "l"], "m")}" - width="${select("width", ["s", "m", "l"], "s")}" + width-scale="${select("width-scale", ["s", "m", "l"], "s")}" ${boolean("fullscreen", false)} ${boolean("docked", false)} ${boolean("escape-disabled", false)} diff --git a/packages/calcite-components/src/components/modal/modal.tsx b/packages/calcite-components/src/components/modal/modal.tsx index 02b76609e28..ace7cf1348b 100644 --- a/packages/calcite-components/src/components/modal/modal.tsx +++ b/packages/calcite-components/src/components/modal/modal.tsx @@ -128,7 +128,7 @@ export class Modal @Prop({ reflect: true }) scale: Scale = "m"; /** Specifies the width of the component. */ - @Prop({ reflect: true }) width: Scale = "m"; + @Prop({ reflect: true }) widthScale: Scale = "m"; /** Sets the component to always be fullscreen (overrides `width` and `--calcite-modal-width` / `--calcite-modal-height`). */ @Prop({ reflect: true }) fullscreen: boolean; diff --git a/packages/calcite-components/src/demos/modal.html b/packages/calcite-components/src/demos/modal.html index 16fa4782b92..057faddf03d 100644 --- a/packages/calcite-components/src/demos/modal.html +++ b/packages/calcite-components/src/demos/modal.html @@ -53,12 +53,12 @@
The small modal is perfect for short confirmation dialogs or very compact interfaces with few elements. @@ -82,10 +82,10 @@
The small modal is perfect for short confirmation dialogs or very compact interfaces with few elements. @@ -109,10 +109,10 @@
The small modal is perfect for short confirmation dialogs or very compact interfaces with few elements. @@ -143,12 +143,12 @@