@uva-glass/component-library
Version:
React components UvA
60 lines (59 loc) • 1.34 kB
JavaScript
import { jsx as n } from "react/jsx-runtime";
import { fn as r } from "../../index-DXR-TB1d.js";
import { IconButton as t } from "./IconButton.js";
import { Icon as i } from "../Icon/Icon.js";
const l = `<IconButton variant={variant} aria-label={aria-label} onClick={onClickFunction}>
<Icon name={iconName} size={size} />
</IconButton>`, b = {
title: "Atoms/IconButton",
component: t,
argTypes: {
variant: {
options: ["destructive"],
control: { type: "check" }
},
noBorder: {
control: "boolean",
default: !1
},
wide: {
control: "boolean",
default: !1
},
"aria-label": {
table: {
disable: !0
}
},
type: {
options: ["button", "submit", "reset"],
control: { type: "select" }
},
children: {
table: {
disable: !0
}
}
},
parameters: {
inspectComponent: t,
codeString: l
}
}, s = (o) => {
const e = o.variant ?? [], a = { ...o, variant: e.toString() };
return /* @__PURE__ */ n(t, { ...a });
}, c = s.bind({});
c.args = {
"aria-label": "Trash",
variant: "destructive",
noBorder: !1,
wide: !1,
disabled: !1,
children: /* @__PURE__ */ n(i, { name: "Trash" }),
onClick: r()
};
export {
c as IconButtonExample,
b as default
};
//# sourceMappingURL=IconButton.stories.js.map