feat(button): add v11 styles (#1642)

* 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

* test: update button test
This commit is contained in:
Enrico Sacchetti 2023-02-06 22:28:41 -05:00
commit 6fc0ab3290
No known key found for this signature in database
GPG key ID: 3374B89ECA60D796
7 changed files with 72 additions and 61 deletions

View file

@ -1,5 +1,5 @@
<script lang="ts">
import { Button } from "../types";
import { Button } from "../package";
import Add from "carbon-icons-svelte/lib/Add.svelte";
</script>
@ -13,9 +13,9 @@
<Button kind="danger">Danger button</Button>
<Button kind="danger-tertiary">Danger tertiary button</Button>
<Button kind="danger--tertiary">Danger tertiary button</Button>
<Button kind="danger-ghost">Danger ghost button</Button>
<Button kind="danger--ghost">Danger ghost button</Button>
<Button icon="{Add}">With icon</Button>