Skip to content

Commit

Permalink
argtable edits
Browse files Browse the repository at this point in the history
  • Loading branch information
basher committed Sep 17, 2024
1 parent 9b227e5 commit 1c19ae5
Show file tree
Hide file tree
Showing 9 changed files with 163 additions and 18 deletions.
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "web-ui-boilerplate",
"description": "UI boilerplate for websites/webapps using vanilla HTML/CSS/JavaScript, powered by Storybook, bundled by Parcel.",
"author": "basher",
"version": "3.1.24",
"version": "3.1.25",
"license": "ISC",
"repository": {
"type": "git",
Expand Down
9 changes: 8 additions & 1 deletion ui/stories/4. Forms/Form/Form.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ export default {
},
},
argTypes: {
makeFieldsRequired: { control: 'boolean' },
makeFieldsRequired: {
control: 'boolean',
description: 'Make form fields required.',
table: {
type: { summary: 'boolean' },
defaultValue: { summary: 'false' }
},
},
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ export default {
argTypes: {
centered: {
control: 'boolean',
description: 'Horizontally center buttons.',
table: {
type: { summary: 'boolean' },
defaultValue: { summary: 'false' }
},
},
},
};
Expand Down
28 changes: 26 additions & 2 deletions ui/stories/5. Components/Buttons & Links/Buttons/Button.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,40 @@ export default {
},
},
argTypes: {
label: { control: 'text' },
label: {
control: 'text',
description: 'Button label text.',
table: {
type: { summary: 'string' },
defaultValue: { summary: 'Non-empty string' }
},
},
buttonType: {
control: 'select',
options: ['primary', 'secondary', 'positive', 'negative'],
description: 'Button style override.',
table: {
type: { summary: 'select' },
defaultValue: { summary: 'N/A' }
},
},
buttonSize: {
control: 'select',
options: ['small'],
description: 'Button size.',
table: {
type: { summary: 'select' },
defaultValue: { summary: 'N/A' }
},
},
disabled: {
control: 'boolean',
description: 'Disable button.',
table: {
type: { summary: 'boolean' },
defaultValue: { summary: 'false' }
},
},
disabled: { control: 'boolean' },
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,32 @@ export default {
},
},
argTypes: {
iconRef: {
control: 'select',
options: ['down', 'left', 'right', 'up', 'close'],
description: 'Name of icon from sprite.',
table: {
type: { summary: 'select' },
defaultValue: { summary: 'N/A' }
},
},
iconSize: {
control: 'select',
options: ['small', 'medium', 'large'],
description: 'Icon size.',
table: {
type: { summary: 'select' },
defaultValue: { summary: 'N/A' }
},
},
iconRef: {
control: 'select',
options: ['down', 'left', 'right', 'up', 'close'],
disabled: {
control: 'boolean',
description: 'Disable button.',
table: {
type: { summary: 'boolean' },
defaultValue: { summary: 'false' }
},
},
disabled: { control: 'boolean' },
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,57 @@ export default {
},
},
argTypes: {
label: { control: 'text' },
label: {
control: 'text',
description: 'Button label text.',
table: {
type: { summary: 'string' },
defaultValue: { summary: 'Non-empty string' }
},
},
buttonType: {
control: 'select',
options: ['primary', 'secondary', 'positive', 'negative'],
description: 'Button style override.',
table: {
type: { summary: 'select' },
defaultValue: { summary: 'N/A' }
},
},
buttonSize: {
control: 'select',
options: ['small'],
description: 'Button size.',
table: {
type: { summary: 'select' },
defaultValue: { summary: 'N/A' }
},
},
iconRef: {
control: 'select',
options: ['down', 'left', 'right', 'up', 'close'],
description: 'Name of icon from sprite.',
table: {
type: { summary: 'select' },
defaultValue: { summary: 'N/A' }
},
},
swapIconPosition: {
control: 'boolean',
description: 'Swap icon position.',
table: {
type: { summary: 'boolean' },
defaultValue: { summary: 'false' }
},
},
disabled: {
control: 'boolean',
description: 'Disable button.',
table: {
type: { summary: 'boolean' },
defaultValue: { summary: 'false' }
},
},
swapIconPosition: { control: 'boolean' },
disabled: { control: 'boolean' },
},
};

Expand Down
18 changes: 14 additions & 4 deletions ui/stories/5. Components/Buttons & Links/Links/IconLink.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,23 @@ export default {
},
},
argTypes: {
iconSize: {
control: 'select',
options: ['small', 'medium', 'large'],
},
iconRef: {
control: 'select',
options: ['down', 'left', 'right', 'up', 'close'],
description: 'Name of icon from sprite.',
table: {
type: { summary: 'select' },
defaultValue: { summary: 'N/A' }
},
},
iconSize: {
control: 'select',
options: ['small', 'medium', 'large'],
description: 'Icon size.',
table: {
type: { summary: 'select' },
defaultValue: { summary: 'N/A' }
},
},
},
};
Expand Down
19 changes: 18 additions & 1 deletion ui/stories/5. Components/Buttons & Links/Links/Link.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,31 @@ export default {
},
},
argTypes: {
label: { control: 'text' },
label: {
control: 'text',
description: 'Link label text.',
table: {
type: { summary: 'string' },
defaultValue: { summary: 'Non-empty string' }
},
},
linkType: {
control: 'select',
options: ['primary', 'secondary', 'positive', 'negative'],
description: 'Link style override.',
table: {
type: { summary: 'select' },
defaultValue: { summary: 'N/A' }
},
},
linkSize: {
control: 'select',
options: ['small'],
description: 'Button size.',
table: {
type: { summary: 'select' },
defaultValue: { summary: 'N/A' }
},
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,49 @@ export default {
},
},
argTypes: {
label: { control: 'text' },
label: {
control: 'text',
description: 'Link label text.',
table: {
type: { summary: 'string' },
defaultValue: { summary: 'Non-empty string' }
},
},
linkType: {
control: 'select',
options: ['primary', 'secondary', 'positive', 'negative'],
description: 'Link style override.',
table: {
type: { summary: 'select' },
defaultValue: { summary: 'N/A' }
},
},
linkSize: {
control: 'select',
options: ['small'],
description: 'Button size.',
table: {
type: { summary: 'select' },
defaultValue: { summary: 'N/A' }
},
},
iconRef: {
control: 'select',
options: ['down', 'left', 'right', 'up', 'close'],
description: 'Name of icon from sprite.',
table: {
type: { summary: 'select' },
defaultValue: { summary: 'N/A' }
},
},
swapIconPosition: {
control: 'boolean',
description: 'Swap icon position.',
table: {
type: { summary: 'boolean' },
defaultValue: { summary: 'false' }
},
},
swapIconPosition: { control: 'boolean' },
},
};

Expand Down

0 comments on commit 1c19ae5

Please sign in to comment.