silphius/stories/slot.stories.js

67 lines
945 B
JavaScript
Raw Normal View History

2024-07-20 04:32:33 -05:00
import Slot from '@/react/components/slot.jsx';
2024-06-10 22:42:30 -05:00
import DomDecorator from './dom-decorator.jsx';
export default {
title: 'Dom/Inventory/Slot',
component: Slot,
decorators: [
DomDecorator({
style: {
border: '2px solid #999',
lineHeight: 0,
position: 'absolute',
left: '50%',
top: '50%',
transform: 'translate(-50%, -50%)',
},
}),
],
tags: ['autodocs'],
argTypes: {
image: {
control: 'text',
},
qty: {
control: {
type: 'number',
min: 1,
max: 9999,
}
},
},
args: {
2024-09-17 01:25:39 -05:00
icon: '/resources/potion/icon.png',
2024-06-10 22:42:30 -05:00
},
};
export const Single = {
args: {
qty: 1,
},
};
export const OneDigit = {
args: {
qty: 9,
},
};
export const TwoDigit = {
args: {
qty: 99,
},
};
export const ThreeDigit = {
args: {
qty: 999,
},
};
export const FourDigit = {
args: {
qty: 9999,
},
};