mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 10:51:06 +00:00
feat: support size prop for input components
- DatePickerInput, NumberInput, Select, PasswordInput, TextInput
This commit is contained in:
parent
9dd9c09362
commit
331dc4a656
9 changed files with 60 additions and 11 deletions
|
@ -1,11 +1,24 @@
|
|||
import { withKnobs, text, boolean, number } from "@storybook/addon-knobs";
|
||||
import {
|
||||
withKnobs,
|
||||
text,
|
||||
boolean,
|
||||
number,
|
||||
select,
|
||||
} from "@storybook/addon-knobs";
|
||||
import Component from "./NumberInput.Story.svelte";
|
||||
|
||||
export default { title: "NumberInput", decorators: [withKnobs] };
|
||||
|
||||
const sizes = {
|
||||
"Extra large size (xl)": "xl",
|
||||
"Default size": undefined,
|
||||
"Small size (sm)": "sm",
|
||||
};
|
||||
|
||||
export const Default = () => ({
|
||||
Component,
|
||||
props: {
|
||||
size: select("Field size (size)", sizes, undefined) || undefined,
|
||||
id: text("NumberInput id", "number-input-id"),
|
||||
name: text("NumberInput name", "number-input-name"),
|
||||
label: text("Label (label)", "Number Input label"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue