mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
feat(modal): support primaryButtonIcon prop (#1047)
This commit is contained in:
parent
f53b5472e5
commit
a8039a4d1e
8 changed files with 96 additions and 31 deletions
|
@ -6073,6 +6073,16 @@
|
|||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "primaryButtonIcon",
|
||||
"kind": "let",
|
||||
"description": "Specify the primary button icon",
|
||||
"type": "typeof import(\"svelte\").SvelteComponent",
|
||||
"isFunction": false,
|
||||
"isFunctionDeclaration": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "shouldSubmitOnEnter",
|
||||
"kind": "let",
|
||||
|
@ -6237,6 +6247,16 @@
|
|||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "primaryButtonIcon",
|
||||
"kind": "let",
|
||||
"description": "Specify the primary button icon",
|
||||
"type": "typeof import(\"svelte\").SvelteComponent",
|
||||
"isFunction": false,
|
||||
"isFunctionDeclaration": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "primaryButtonDisabled",
|
||||
"kind": "let",
|
||||
|
|
|
@ -42,3 +42,6 @@ Use the `secondaryButtons` prop to render two secondary buttons for a "3-button
|
|||
|
||||
<FileSource src="/framed/Modal/ModalPreventOutsideClick" />
|
||||
|
||||
### Button with icon
|
||||
|
||||
<FileSource src="/framed/Modal/ModalButtonWithIcon" />
|
||||
|
|
14
docs/src/pages/framed/Modal/ModalButtonWithIcon.svelte
Normal file
14
docs/src/pages/framed/Modal/ModalButtonWithIcon.svelte
Normal file
|
@ -0,0 +1,14 @@
|
|||
<script>
|
||||
import { Modal } from "carbon-components-svelte";
|
||||
import Send16 from "carbon-icons-svelte/lib/Send16";
|
||||
</script>
|
||||
|
||||
<Modal
|
||||
open
|
||||
modalHeading="Invite someone"
|
||||
primaryButtonText="Send invitation"
|
||||
primaryButtonIcon="{Send16}"
|
||||
secondaryButtonText="Cancel"
|
||||
>
|
||||
<p>Do you really want to invite someone?</p>
|
||||
</Modal>
|
Loading…
Add table
Add a link
Reference in a new issue