mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-17 11:11:25 +00:00
feat(button): derive hasIconOnly from icon and slots
Instead of explicitly defining hasIconOnly, its value can be inferred from a falsy icon prop and an empty slot.
This commit is contained in:
parent
475acd6a5e
commit
2d3edce3ca
2 changed files with 2 additions and 2 deletions
|
@ -50,7 +50,7 @@
|
|||
{:else if story === 'inline'}
|
||||
<Button />
|
||||
{:else if story === 'icon-only buttons'}
|
||||
<Button {...iconOnlyProps} hasIconOnly />
|
||||
<Button {...iconOnlyProps} />
|
||||
{:else if story === 'set of buttons'}
|
||||
<div class={cx('--btn-set')}>
|
||||
<Button kind="secondary" {...setProps}>Secondary button</Button>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue