fix(button): export hasIconOnly prop

Closes #174
This commit is contained in:
Eric Liu 2020-05-07 18:37:52 -07:00
commit 89ec5fbf41
4 changed files with 9 additions and 2 deletions

View file

@ -26,6 +26,7 @@
};
const iconOnlyProps = {
hasIconOnly: true,
kind,
disabled,
size,

View file

@ -6,6 +6,7 @@
export let href = undefined;
export let icon = undefined;
export let iconDescription = undefined;
export let hasIconOnly = false;
export let kind = 'primary';
export let size = 'default';
export let style = undefined;
@ -24,7 +25,6 @@
$: if (ctx && buttonRef) {
ctx.declareRef(buttonRef);
}
$: hasIconOnly = !!icon && !$$props.$$slots;
$: buttonProps = {
role: 'button',
type: href && !disabled ? undefined : type,