DEV: Support rendering <DModal> as a <form> element (#22507)

This commit is contained in:
David Taylor
2023-07-10 10:28:45 +01:00
committed by GitHub
parent 7339be7952
commit 9a1a3906c4
5 changed files with 54 additions and 3 deletions

View File

@ -32,6 +32,15 @@
{{on "click" this.toggleDismissable}}
/>
</Styleguide::Controls::Row>
<Styleguide::Controls::Row @name="@tagName">
<ComboBox
@value={{this.modalTagName}}
@content={{this.modalTagNames}}
@onChange={{fn (mut this.modalTagName)}}
@valueProperty={{null}}
@nameProperty={{null}}
/>
</Styleguide::Controls::Row>
<Styleguide::Controls::Row @name="@title">
<Input @value={{this.title}} />
</Styleguide::Controls::Row>

View File

@ -6,6 +6,7 @@ import I18n from "I18n";
export default class extends Component {
@tracked inline = true;
@tracked dismissable = true;
@tracked modalTagName = "div";
@tracked title = I18n.t("styleguide.sections.modal.header");
@tracked body = this.args.dummy.shortLorem;
@tracked subtitle = "";
@ -13,6 +14,7 @@ export default class extends Component {
@tracked flashType = "success";
flashTypes = ["success", "info", "warning", "error"];
modalTagNames = ["div", "form"];
@action
toggleInline() {