@pagopa/mui-italia
Version:
[Material-UI](https://mui.com/core/) theme inspired by [Bootstrap Italia](https://italia.github.io/bootstrap-italia/).
68 lines (67 loc) • 2.71 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.WithStartIcon = exports.WithEndIcon = exports.Default = void 0;
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const ButtonNaked_1 = require("../ButtonNaked");
const LogoutRounded_1 = tslib_1.__importDefault(require("@mui/icons-material/LogoutRounded"));
const AttachFileRounded_1 = tslib_1.__importDefault(require("@mui/icons-material/AttachFileRounded"));
const disableControl = {
table: {
disable: true,
},
};
exports.default = {
title: "Components/ButtonNaked",
component: ButtonNaked_1.ButtonNaked,
args: {
children: "Discover more",
disabled: false,
},
argTypes: {
size: {
options: ["small", "medium", "large"],
control: { type: "radio" },
table: {
type: { summary: "string" },
defaultValue: { summary: "medium" },
},
},
color: {
options: ["text", "primary", "error"],
control: { type: "radio" },
table: {
type: { summary: "string" },
defaultValue: { summary: "text" },
},
},
disabled: {
options: [true, false],
control: { type: "boolean" },
table: {
type: { summary: "boolean" },
defaultValue: { summary: false },
},
},
variant: Object.assign({}, disableControl),
disableElevation: Object.assign({}, disableControl),
disableRipple: Object.assign({}, disableControl),
disableTouchRipple: Object.assign({}, disableControl),
TouchRippleProps: Object.assign({}, disableControl),
touchRippleRef: Object.assign({}, disableControl),
FocusRipple: Object.assign({}, disableControl),
centerRipple: Object.assign({}, disableControl),
},
};
const Template = (args) => ((0, jsx_runtime_1.jsx)(ButtonNaked_1.ButtonNaked, Object.assign({}, args)));
exports.Default = Template.bind({});
exports.Default.args = {
size: "medium",
color: "text",
};
exports.WithEndIcon = Template.bind({});
exports.WithEndIcon.storyName = "Default + End Icon";
exports.WithEndIcon.args = Object.assign(Object.assign({}, exports.Default.args), { endIcon: (0, jsx_runtime_1.jsx)(LogoutRounded_1.default, {}) });
exports.WithStartIcon = Template.bind({});
exports.WithStartIcon.storyName = "Default + Start Icon";
exports.WithStartIcon.args = Object.assign(Object.assign({}, exports.Default.args), { children: "Download file", startIcon: (0, jsx_runtime_1.jsx)(AttachFileRounded_1.default, {}) });