Skip to content

Commit 87eec49

Browse files
authored
Merge pull request #2365 from FelipePaluco/ISSUE-2293
feat: Add missing 'md' size
2 parents da5a483 + 807d900 commit 87eec49

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/modal/modal.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ export class ModalDemo {
8989
[ngClass]="{
9090
'bx--modal-container--xs': size === 'xs',
9191
'bx--modal-container--sm': size === 'sm',
92+
'bx--modal-container--md': size === 'md',
9293
'bx--modal-container--lg': size === 'lg'
9394
}"
9495
role="dialog"
@@ -141,7 +142,7 @@ export class Modal implements AfterViewInit, OnChanges, OnDestroy {
141142
/**
142143
* Size of the modal to display.
143144
*/
144-
@Input() size: "xs" | "sm" | "lg";
145+
@Input() size: "xs" | "sm" | "md" | "lg" = "md";
145146
/**
146147
* Classification of the modal.
147148
*/

src/modal/modal.stories.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class ModalStory {
119119

120120
@Input() modalText = "Hello, World";
121121

122-
@Input() size = "default";
122+
@Input() size = "md";
123123

124124
@Input() showCloseButton = true;
125125

@@ -186,7 +186,7 @@ class InputModal extends BaseModal {
186186
class DataPassingModal implements AfterContentInit {
187187
@Input() modalText = "Hello, World";
188188

189-
@Input() size = "default";
189+
@Input() size = "md";
190190

191191
protected modalInputValue = "";
192192
protected data: Observable<string> = new Subject<string>();
@@ -242,7 +242,7 @@ class AlertModalStory {
242242

243243
const getOptions = (options = {}) => {
244244
return Object.assign({}, {
245-
size: select("size", [null, "xs", "sm", "lg"], null)
245+
size: select("size", ["xs", "sm", "md", "lg"], "md")
246246
}, options);
247247
};
248248

@@ -359,7 +359,7 @@ storiesOf("Components|Modal", module)
359359
`,
360360
props: {
361361
modalText: text("modalText", "Hello, World!"),
362-
size: select("size", ["xs", "sm", "default", "lg"], "default")
362+
size: select("size", ["xs", "sm", "md", "lg"], "md")
363363
}
364364
}))
365365
.add("Simple modal", () => ({

0 commit comments

Comments
 (0)