Files
baserow/web-frontend/stories/ButtonIcon.stories.js
Jonathan Adeline 38ccc54c2e chore: update Iconoir to 7.12.2 (#7012)
* chore(deps): update Iconoir to 7.12.2

* test: update grid visibility selector for Iconoir 7

* fix: restore open and slashed eye icons

* docs: document Iconoir 7 plugin changes
2026-12-04 15:36:56 +04:00

102 lines
2.1 KiB
JavaScript

import ButtonIcon from '@baserow/modules/core/components/ButtonIcon'
export default {
title: 'Baserow/Buttons/ButtonIcon',
component: ButtonIcon,
tags: ['autodocs'],
argTypes: {
icon: {
control: 'text',
description: 'The icon class name',
},
type: {
control: 'select',
options: ['primary', 'secondary'],
description: 'Color variant',
},
size: {
control: 'select',
options: ['regular', 'small'],
description: 'Size of the button',
},
loading: {
control: 'boolean',
description: 'Show loading state',
},
disabled: {
control: 'boolean',
description: 'Disable interaction',
},
active: {
control: 'boolean',
description: 'Active state',
},
tag: {
control: 'select',
options: ['button', 'a', 'nuxt-link'],
description: 'Root HTML tag',
},
},
args: {
icon: 'iconoir-more-horiz',
type: 'primary',
size: 'regular',
loading: false,
disabled: false,
active: false,
tag: 'button',
},
}
export const Default = {
render: (args) => ({
components: { ButtonIcon },
setup() {
return { args }
},
template: '<ButtonIcon v-bind="args" />',
}),
}
export const Secondary = {
args: {
type: 'secondary',
icon: 'iconoir-xmark',
},
render: (args) => ({
components: { ButtonIcon },
setup() {
return { args }
},
template: '<ButtonIcon v-bind="args" />',
}),
}
export const Small = {
args: {
size: 'small',
icon: 'iconoir-search',
},
render: (args) => ({
components: { ButtonIcon },
setup() {
return { args }
},
template: '<ButtonIcon v-bind="args" />',
}),
}
export const AllStates = {
render: () => ({
components: { ButtonIcon },
template: `
<div style="display: flex; gap: 10px;">
<ButtonIcon icon="iconoir-settings" />
<ButtonIcon icon="iconoir-settings" active />
<ButtonIcon icon="iconoir-settings" disabled />
<ButtonIcon icon="iconoir-settings" loading />
</div>
`,
}),
}