mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-19 20:09:35 +00:00
refactor: prefer class directive over class attribute
This commit is contained in:
parent
90477c4d0e
commit
6d8a9ba5ba
9 changed files with 34 additions and 18 deletions
|
@ -67,7 +67,11 @@
|
|||
class:bx--btn="{true}"
|
||||
class:bx--btn--sm="{true}"
|
||||
class:bx--btn--disabled="{disabled}"
|
||||
class="{kind && `bx--btn--${kind}`}"
|
||||
class:bx--btn--primary="{kind === 'primary'}"
|
||||
class:bx--btn--secondary="{kind === 'secondary'}"
|
||||
class:bx--btn--tertiary="{kind === 'tertiary'}"
|
||||
class:bx--btn--ghost="{kind === 'ghost'}"
|
||||
class:bx--btn--danger="{kind === 'danger'}"
|
||||
on:keydown
|
||||
on:keydown="{({ key }) => {
|
||||
if (key === ' ' || key === 'Enter') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue