mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-19 03:49:34 +00:00
feat(button): add isSelected prop for icon-only, ghost buttons
This commit is contained in:
parent
13276999d0
commit
5f3450839a
5 changed files with 36 additions and 0 deletions
|
@ -17,6 +17,11 @@
|
|||
*/
|
||||
export let size = "default";
|
||||
|
||||
/**
|
||||
* Set to `true` to enable the selected state for an icon-only, ghost button
|
||||
*/
|
||||
export let isSelected = false;
|
||||
|
||||
/**
|
||||
* Set to `true` for the icon-only variant
|
||||
* @deprecated inferred using the $$slots API
|
||||
|
@ -104,6 +109,7 @@
|
|||
hasIconOnly &&
|
||||
tooltipAlignment &&
|
||||
`bx--tooltip--align-${tooltipAlignment}`,
|
||||
hasIconOnly && isSelected && kind === "ghost" && "bx--btn--selected",
|
||||
$$restProps.class,
|
||||
]
|
||||
.filter(Boolean)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue