mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 19:14:43 +08:00
DEV: Support rendering <DModal>
as a <form>
element (#22507)
This commit is contained in:
@ -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>
|
||||
|
@ -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() {
|
||||
|
Reference in New Issue
Block a user