Skip to content

Commit caefdef

Browse files
committed
feat(stepper-motor): add size attribute #138
1 parent da9a39e commit caefdef

File tree

2 files changed

+294
-141
lines changed

2 files changed

+294
-141
lines changed

src/stepper-motor-element.stories.ts

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,47 @@ export default {
66
component: 'wokwi-stepper-motor',
77
argTypes: {
88
angle: { control: { type: 'range', min: 0, max: 360 } },
9+
size: { control: { type: 'select', options: [8, 11, 14, 17, 23, 34] } },
910
arrow: { control: { type: 'color' } },
1011
},
1112
args: {
1213
angle: 0,
1314
arrow: '',
1415
units: '',
1516
value: '',
17+
size: 23,
1618
},
1719
};
1820

19-
const Template = ({ angle, arrow, units, value }) =>
21+
const Template = ({ angle, arrow, units, value, size }) =>
2022
html`<wokwi-stepper-motor
2123
.angle=${angle}
2224
.arrow=${arrow}
2325
.units=${units}
2426
.value=${value}
27+
.size=${size}
2528
></wokwi-stepper-motor>`;
2629

2730
export const Default = Template.bind({});
2831
Default.args = {};
2932

3033
export const Rotated90 = Template.bind({});
31-
Rotated90.args = { angle: 90, units: 'degrees', value: '90' };
34+
Rotated90.args = { angle: 90, units: 'degrees', value: '90', size: 14 };
3235

3336
export const Steps = Template.bind({});
34-
Steps.args = { angle: 180, value: '52,500', units: 'steps' };
37+
Steps.args = { angle: 180, value: '52,500', units: 'steps', size: 14 };
38+
39+
export const Degrees = Template.bind({});
40+
Degrees.args = { angle: 180, value: '180', units: 'degrees', size: 14 };
3541

3642
export const PurpleArrow = Template.bind({});
37-
PurpleArrow.args = { angle: 70, arrow: '#4a36ba' };
43+
PurpleArrow.args = { angle: 350, arrow: '#4a36ba', size: 14 };
44+
45+
export const Nema17 = Template.bind({});
46+
Nema17.args = { angle: 70, arrow: '#4a36ba', size: 17 };
47+
48+
export const Nema23 = Template.bind({});
49+
Nema23.args = { angle: 70, arrow: '#4a36ba', value: '1234', units: 'steps', size: 23 };
50+
51+
export const Nema34 = Template.bind({});
52+
Nema34.args = { angle: 70, arrow: '#4a36ba', value: '180', units: 'degrees', size: 34 };

0 commit comments

Comments
 (0)