feat(modal): support 3-button Modal, ComposedModal (#724)

* feat(modal): support 3-button modal #528, #472

* fix(modal): "supercede" --> "supersede"

* test(modal): test secondaryButtons prop, updated click:button--secondary custom event

* docs(modal): add multiple secondary button example for ComposedModal

* docs(modal): rename example

* fix(modal): do not render secondary button if secondaryButtonText is falsy

* docs(composed-modal): add button to re-open modal
This commit is contained in:
Eric Liu 2021-07-05 08:44:51 -07:00 committed by GitHub
commit f4a3646cb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 230 additions and 50 deletions

View file

@ -5397,6 +5397,16 @@
"constant": false,
"reactive": false
},
{
"name": "secondaryButtons",
"kind": "let",
"description": "2-tuple prop to render two secondary buttons for a 3 button modal\nsupersedes `secondaryButtonText`",
"type": "[{ text: string; }, { text: string; }]",
"value": "[]",
"isFunction": false,
"constant": false,
"reactive": false
},
{
"name": "selectorPrimaryFocus",
"kind": "let",
@ -5459,13 +5469,17 @@
"name": "transitionend",
"detail": "{ open: boolean; }"
},
{
"type": "dispatched",
"name": "click:button--secondary",
"detail": "{ text: string; }"
},
{ "type": "forwarded", "name": "keydown", "element": "div" },
{ "type": "forwarded", "name": "click", "element": "div" },
{ "type": "forwarded", "name": "mouseover", "element": "div" },
{ "type": "forwarded", "name": "mouseenter", "element": "div" },
{ "type": "forwarded", "name": "mouseleave", "element": "div" },
{ "type": "dispatched", "name": "submit" },
{ "type": "dispatched", "name": "click:button--secondary" },
{ "type": "dispatched", "name": "close" },
{ "type": "dispatched", "name": "open" }
],
@ -5545,6 +5559,16 @@
"constant": false,
"reactive": false
},
{
"name": "secondaryButtons",
"kind": "let",
"description": "2-tuple prop to render two secondary buttons for a 3 button modal\nsupersedes `secondaryButtonText`",
"type": "[{ text: string; }, { text: string; }]",
"value": "[]",
"isFunction": false,
"constant": false,
"reactive": false
},
{
"name": "secondaryClass",
"kind": "let",
@ -5566,7 +5590,13 @@
}
],
"slots": [{ "name": "__default__", "default": true, "slot_props": "{}" }],
"events": [],
"events": [
{
"type": "dispatched",
"name": "click:button--secondary",
"detail": "{ text: string; }"
}
],
"typedefs": [],
"rest_props": { "type": "Element", "name": "div" }
},