mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-19 03:49:34 +00:00
feat(button): adopt v11 styles
- forward focus and blur events - provide button role for custom elements using 'as' BREAKING CHANGE: danger-tertiary and danger-ghost props were renamed to danger--tertiary and danger--ghost BREAKING CHANGE: buttons now have a larger minimum width
This commit is contained in:
parent
10229fecb4
commit
a1302baa44
7 changed files with 70 additions and 63 deletions
|
@ -453,7 +453,7 @@
|
|||
"name": "kind",
|
||||
"kind": "let",
|
||||
"description": "Specify the kind of button",
|
||||
"type": "\"primary\" | \"secondary\" | \"tertiary\" | \"ghost\" | \"danger\" | \"danger-tertiary\" | \"danger-ghost\"",
|
||||
"type": "\"primary\" | \"secondary\" | \"tertiary\" | \"ghost\" | \"danger\" | \"danger--tertiary\" | \"danger--ghost\"",
|
||||
"value": "\"primary\"",
|
||||
"isFunction": false,
|
||||
"isFunctionDeclaration": false,
|
||||
|
@ -651,7 +651,9 @@
|
|||
"type": "forwarded",
|
||||
"name": "mouseleave",
|
||||
"element": "ButtonSkeleton"
|
||||
}
|
||||
},
|
||||
{ "type": "forwarded", "name": "focus", "element": "ButtonSkeleton" },
|
||||
{ "type": "forwarded", "name": "blur", "element": "ButtonSkeleton" }
|
||||
],
|
||||
"typedefs": [],
|
||||
"rest_props": { "type": "Element", "name": "button | a | div" },
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
## Danger tertiary button
|
||||
|
||||
<Button kind="danger-tertiary">Danger tertiary button</Button>
|
||||
<Button kind="danger--tertiary">Danger tertiary button</Button>
|
||||
|
||||
## Danger tertiary, icon-only button
|
||||
|
||||
|
@ -40,11 +40,11 @@
|
|||
</div>
|
||||
</InlineNotification>
|
||||
|
||||
<Button kind="danger-tertiary"iconDescription="Delete" icon={TrashCan} />
|
||||
<Button kind="danger--tertiary"iconDescription="Delete" icon={TrashCan} />
|
||||
|
||||
## Danger ghost button
|
||||
|
||||
<Button kind="danger-ghost">Danger ghost button</Button>
|
||||
<Button kind="danger--ghost">Danger ghost button</Button>
|
||||
|
||||
## Button with icon
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue