From c8d614a3baefe3d669ad19044eac94da9278da20 Mon Sep 17 00:00:00 2001 From: Artem Tarasov Date: Sun, 7 Mar 2021 14:57:26 +0300 Subject: [PATCH] Web: Components: refactoring stories, add public/images to components for storybook --- .../asc-web-components/.storybook/main.js | 10 +- .../asc-web-components/.storybook/preview.js | 5 + .../avatar-editor/avatar-editor.stories.js | 69 +--- .../avatar-editor/avatar-editor.stories.mdx | 0 .../asc-web-components/avatar-editor/index.js | 25 +- .../backdrop/backdrop.stories.js | 21 +- packages/asc-web-components/backdrop/index.js | 8 + .../asc-web-components/badge/badge.stories.js | 31 -- packages/asc-web-components/badge/index.js | 12 + .../asc-web-components/box/box.stories.js | 1 - .../button/button.stories.js | 44 +-- packages/asc-web-components/button/index.js | 20 +- .../calendar/calendar.stories.js | 48 +-- packages/asc-web-components/calendar/index.js | 13 +- .../checkbox/checkbox.stories.js | 43 +-- packages/asc-web-components/checkbox/index.js | 20 +- .../checkbox/svg/checkbox.checked.react.svg | 5 + .../svg/checkbox.indeterminate.react.svg | 5 + .../checkbox/svg/checkbox.react.svg | 4 + .../combobox/combobox.stories.js | 240 +++---------- .../combobox/combobox.stories.mdx | 153 ++++++++ packages/asc-web-components/combobox/index.js | 23 ++ .../context-menu-button.stories.js | 117 ++----- .../context-menu-button/index.js | 29 +- .../context-menu/context-menu.stories.js | 16 +- .../asc-web-components/context-menu/index.js | 6 + .../date-picker/date-picker.stories.js | 144 +++----- .../asc-web-components/date-picker/index.js | 20 +- .../drag-and-drop/drag-and-drop.stories.js | 30 +- .../asc-web-components/drag-and-drop/index.js | 6 + .../drop-down-item/drop-down-item.stories.js | 150 +++----- .../drop-down-item/index.js | 13 + .../drop-down/drop-down.stories.js | 213 +++-------- .../asc-web-components/drop-down/index.js | 32 +- .../empty-screen-container.stories.js | 36 +- .../empty-screen-container/index.js | 9 + .../field-container.stories.js | 99 +----- .../field-container/index.js | 15 + .../file-input/file-input.stories.js | 36 +- .../asc-web-components/file-input/index.js | 16 +- packages/asc-web-components/grid/grid.js | 26 ++ .../asc-web-components/grid/grid.stories.js | 174 +-------- .../group-button/all.group-buttons.stories.js | 69 ---- .../group-button/group-button.stories.js | 122 ++++++- .../asc-web-components/group-button/index.js | 18 + .../group-buttons-menu.stories.js | 330 ++++++++++-------- .../group-buttons-menu/index.js | 9 + .../heading/heading.stories.js | 61 ++-- packages/asc-web-components/heading/index.js | 10 +- .../help-button/help-button.stories.js | 156 +++++---- .../asc-web-components/help-button/index.js | 6 +- packages/asc-web-components/package.json | 17 +- .../static/images/a-z.sorting.react.svg | 3 + .../images/actions.header.touch.react.svg | 3 + .../public/static/images/arrow.path.react.svg | 3 + .../static/images/button.alert.react.svg | 4 + .../static/images/button.duplicate.react.svg | 4 + .../static/images/button.file.react.svg | 3 + .../static/images/button.move.react.svg | 3 + .../static/images/button.trash.react.svg | 3 + .../static/images/button.upload.react.svg | 3 + .../static/images/calendar.checked.react.svg | 3 + .../public/static/images/calendar.react.svg | 3 + .../static/images/catalog.button.react.svg | 3 + .../images/catalog.departments.react.svg | 3 + .../static/images/catalog.employee.react.svg | 3 + .../static/images/catalog.folder.react.svg | 3 + .../static/images/catalog.guest.react.svg | 3 + .../static/images/catalog.pin.react.svg | 3 + .../static/images/catalog.spam.react.svg | 3 + .../static/images/catalog.trash.react.svg | 3 + .../static/images/catalog.unpin.react.svg | 3 + .../public/static/images/chat.react.svg | 3 + .../static/images/checkbox.checked.react.svg | 5 + .../images/checkbox.indeterminate.react.svg | 5 + .../public/static/images/checkbox.react.svg | 4 + .../public/static/images/copy.react.svg | 3 + .../public/static/images/crm.react.svg | 3 + .../public/static/images/cross.react.svg | 3 + .../static/images/cross.sidebar.react.svg | 3 + .../static/images/empty_screen_filter.png | Bin 0 -> 7586 bytes .../static/images/expander-down.react.svg | 12 + .../static/images/expander-right.react.svg | 10 + .../static/images/external.link.react.svg | 3 + .../public/static/images/eye.off.react.svg | 3 + .../public/static/images/eye.react.svg | 3 + .../images/filter.view.selector.row.react.svg | 3 + .../filter.view.selector.tile.react.svg | 3 + .../public/static/images/info.react.svg | 3 + .../static/images/invitation.link.react.svg | 3 + .../static/images/item.active.react.svg | 3 + .../public/static/images/mail.react.svg | 3 + .../static/images/media.delete.react.svg | 3 + .../static/images/media.download.react.svg | 3 + .../static/images/media.fullscreen.react.svg | 3 + .../public/static/images/media.mute.react.svg | 5 + .../static/images/media.muteoff.react.svg | 6 + .../static/images/media.pause.react.svg | 3 + .../public/static/images/media.play.react.svg | 3 + .../static/images/media.reset.react.svg | 7 + .../static/images/media.rotateleft.react.svg | 3 + .../static/images/media.rotateright.react.svg | 3 + .../static/images/media.zoomin.react.svg | 6 + .../static/images/media.zoomout.react.svg | 5 + .../public/static/images/menu.react.svg | 3 + .../static/images/nav.logo.opened.react.svg | 29 ++ .../public/static/images/nav.logo.react.svg | 19 + .../public/static/images/people.react.svg | 7 + .../public/static/images/projects.react.svg | 3 + .../public/static/images/question.react.svg | 3 + .../images/rectangle.filter.click.react.svg | 5 + .../static/images/rectangle.filter.react.svg | 5 + .../public/static/images/search.react.svg | 3 + .../public/static/images/send.clock.react.svg | 3 + .../public/static/images/settings.react.svg | 3 + .../static/images/share.google.react.svg | 6 + .../static/images/share.linkedin.react.svg | 4 + .../static/images/vertical-dots.react.svg | 3 + .../static/images/z-a.sorting.react.svg | 3 + .../public/static/images/zoom-minus.react.svg | 4 + .../public/static/images/zoom-plus.react.svg | 5 + public/images/catalog.guest.react.svg | 3 + yarn.lock | 2 +- 123 files changed, 1490 insertions(+), 1598 deletions(-) create mode 100644 packages/asc-web-components/avatar-editor/avatar-editor.stories.mdx create mode 100644 packages/asc-web-components/checkbox/svg/checkbox.checked.react.svg create mode 100644 packages/asc-web-components/checkbox/svg/checkbox.indeterminate.react.svg create mode 100644 packages/asc-web-components/checkbox/svg/checkbox.react.svg create mode 100644 packages/asc-web-components/combobox/combobox.stories.mdx delete mode 100644 packages/asc-web-components/group-button/all.group-buttons.stories.js create mode 100644 packages/asc-web-components/public/static/images/a-z.sorting.react.svg create mode 100644 packages/asc-web-components/public/static/images/actions.header.touch.react.svg create mode 100644 packages/asc-web-components/public/static/images/arrow.path.react.svg create mode 100644 packages/asc-web-components/public/static/images/button.alert.react.svg create mode 100644 packages/asc-web-components/public/static/images/button.duplicate.react.svg create mode 100644 packages/asc-web-components/public/static/images/button.file.react.svg create mode 100644 packages/asc-web-components/public/static/images/button.move.react.svg create mode 100644 packages/asc-web-components/public/static/images/button.trash.react.svg create mode 100644 packages/asc-web-components/public/static/images/button.upload.react.svg create mode 100644 packages/asc-web-components/public/static/images/calendar.checked.react.svg create mode 100644 packages/asc-web-components/public/static/images/calendar.react.svg create mode 100644 packages/asc-web-components/public/static/images/catalog.button.react.svg create mode 100644 packages/asc-web-components/public/static/images/catalog.departments.react.svg create mode 100644 packages/asc-web-components/public/static/images/catalog.employee.react.svg create mode 100644 packages/asc-web-components/public/static/images/catalog.folder.react.svg create mode 100644 packages/asc-web-components/public/static/images/catalog.guest.react.svg create mode 100644 packages/asc-web-components/public/static/images/catalog.pin.react.svg create mode 100644 packages/asc-web-components/public/static/images/catalog.spam.react.svg create mode 100644 packages/asc-web-components/public/static/images/catalog.trash.react.svg create mode 100644 packages/asc-web-components/public/static/images/catalog.unpin.react.svg create mode 100644 packages/asc-web-components/public/static/images/chat.react.svg create mode 100644 packages/asc-web-components/public/static/images/checkbox.checked.react.svg create mode 100644 packages/asc-web-components/public/static/images/checkbox.indeterminate.react.svg create mode 100644 packages/asc-web-components/public/static/images/checkbox.react.svg create mode 100644 packages/asc-web-components/public/static/images/copy.react.svg create mode 100644 packages/asc-web-components/public/static/images/crm.react.svg create mode 100644 packages/asc-web-components/public/static/images/cross.react.svg create mode 100644 packages/asc-web-components/public/static/images/cross.sidebar.react.svg create mode 100644 packages/asc-web-components/public/static/images/empty_screen_filter.png create mode 100644 packages/asc-web-components/public/static/images/expander-down.react.svg create mode 100644 packages/asc-web-components/public/static/images/expander-right.react.svg create mode 100644 packages/asc-web-components/public/static/images/external.link.react.svg create mode 100644 packages/asc-web-components/public/static/images/eye.off.react.svg create mode 100644 packages/asc-web-components/public/static/images/eye.react.svg create mode 100644 packages/asc-web-components/public/static/images/filter.view.selector.row.react.svg create mode 100644 packages/asc-web-components/public/static/images/filter.view.selector.tile.react.svg create mode 100644 packages/asc-web-components/public/static/images/info.react.svg create mode 100644 packages/asc-web-components/public/static/images/invitation.link.react.svg create mode 100644 packages/asc-web-components/public/static/images/item.active.react.svg create mode 100644 packages/asc-web-components/public/static/images/mail.react.svg create mode 100644 packages/asc-web-components/public/static/images/media.delete.react.svg create mode 100644 packages/asc-web-components/public/static/images/media.download.react.svg create mode 100644 packages/asc-web-components/public/static/images/media.fullscreen.react.svg create mode 100644 packages/asc-web-components/public/static/images/media.mute.react.svg create mode 100644 packages/asc-web-components/public/static/images/media.muteoff.react.svg create mode 100644 packages/asc-web-components/public/static/images/media.pause.react.svg create mode 100644 packages/asc-web-components/public/static/images/media.play.react.svg create mode 100644 packages/asc-web-components/public/static/images/media.reset.react.svg create mode 100644 packages/asc-web-components/public/static/images/media.rotateleft.react.svg create mode 100644 packages/asc-web-components/public/static/images/media.rotateright.react.svg create mode 100644 packages/asc-web-components/public/static/images/media.zoomin.react.svg create mode 100644 packages/asc-web-components/public/static/images/media.zoomout.react.svg create mode 100644 packages/asc-web-components/public/static/images/menu.react.svg create mode 100644 packages/asc-web-components/public/static/images/nav.logo.opened.react.svg create mode 100644 packages/asc-web-components/public/static/images/nav.logo.react.svg create mode 100644 packages/asc-web-components/public/static/images/people.react.svg create mode 100644 packages/asc-web-components/public/static/images/projects.react.svg create mode 100644 packages/asc-web-components/public/static/images/question.react.svg create mode 100644 packages/asc-web-components/public/static/images/rectangle.filter.click.react.svg create mode 100644 packages/asc-web-components/public/static/images/rectangle.filter.react.svg create mode 100644 packages/asc-web-components/public/static/images/search.react.svg create mode 100644 packages/asc-web-components/public/static/images/send.clock.react.svg create mode 100644 packages/asc-web-components/public/static/images/settings.react.svg create mode 100644 packages/asc-web-components/public/static/images/share.google.react.svg create mode 100644 packages/asc-web-components/public/static/images/share.linkedin.react.svg create mode 100644 packages/asc-web-components/public/static/images/vertical-dots.react.svg create mode 100644 packages/asc-web-components/public/static/images/z-a.sorting.react.svg create mode 100644 packages/asc-web-components/public/static/images/zoom-minus.react.svg create mode 100644 packages/asc-web-components/public/static/images/zoom-plus.react.svg create mode 100644 public/images/catalog.guest.react.svg diff --git a/packages/asc-web-components/.storybook/main.js b/packages/asc-web-components/.storybook/main.js index 0c3f41001a..f4402c53f4 100644 --- a/packages/asc-web-components/.storybook/main.js +++ b/packages/asc-web-components/.storybook/main.js @@ -2,7 +2,7 @@ module.exports = { stories: [ "../backdrop/*.stories.@(js|jsx|ts|tsx)", "../button/*.stories.@(js|jsx|ts|tsx)", - "../avatar/*.stories.@(js|jsx|ts|tsx)", + "../avatar/*.stories.@(js)", "../badge/*.stories.@(js|jsx|ts|tsx)", "../box/*.stories.@(js|jsx|ts|tsx)", "../avatar-editor/*.stories.@(js|jsx|ts|tsx)", @@ -15,11 +15,16 @@ module.exports = { "../drag-and-drop/*.stories.@(js|mdx)", "../drop-down/*.stories.@(js|mdx)", "../drop-down-item/*.stories.@(js|mdx)", - "../email-input/*.stories.@(js|mdx)", + "../email-input/*.stories.@(js)", + "../email-input/*.stories.@(mdx)", "../empty-screen-container/*.stories.@(js|mdx)", "../field-container/*.stories.@(js|mdx)", "../file-input/*.stories.@(js|mdx)", "../grid/*.stories.@(js|mdx)", + "../group-button/*.stories.@(js|mdx)", + "../group-buttons-menu/*.stories.@(js|mdx)", + "../heading/*.stories.@(js|mdx)", + "../help-button/*.stories.@(js|mdx)", ], addons: [ "@storybook/addon-links", @@ -27,5 +32,6 @@ module.exports = { "@storybook/addon-essentials", "@storybook/addon-actions", "@storybook/addon-controls", + "@storybook/addon-viewport", ], }; diff --git a/packages/asc-web-components/.storybook/preview.js b/packages/asc-web-components/.storybook/preview.js index 1b7e7b232e..65ac095b43 100644 --- a/packages/asc-web-components/.storybook/preview.js +++ b/packages/asc-web-components/.storybook/preview.js @@ -1,6 +1,11 @@ +import { MINIMAL_VIEWPORTS } from "@storybook/addon-viewport"; + export const parameters = { actions: { argTypesRegex: "^on[A-Z].*" }, controls: { expanded: true }, + viewport: { + viewports: MINIMAL_VIEWPORTS, + }, }; export const globalTypes = { diff --git a/packages/asc-web-components/avatar-editor/avatar-editor.stories.js b/packages/asc-web-components/avatar-editor/avatar-editor.stories.js index 49333f8ca0..225b59529f 100644 --- a/packages/asc-web-components/avatar-editor/avatar-editor.stories.js +++ b/packages/asc-web-components/avatar-editor/avatar-editor.stories.js @@ -1,48 +1,11 @@ import React from "react"; -import AvatarEditor from "./"; +import AvatarEditorComponent from "./"; import Avatar from "../avatar"; export default { title: "Components/AvatarEditor", - component: AvatarEditor, + component: AvatarEditorComponent, argTypes: { - visible: { description: "Display avatar editor" }, - image: { description: "Display avatar editor" }, - accept: { description: "Accepted file types" }, - displayType: { description: "Display type" }, - useModalDialog: { - description: "Use for the view of the modal dialog or not", - }, - selectNewPhotoLabel: { - description: "Translation string for file selection", - }, - orDropFileHereLabel: { - description: - "Translation string for file dropping (concat with selectNewPhotoLabel prop)", - }, - headerLabel: { description: "Translation string for title" }, - saveButtonLabel: { description: "Translation string for save button" }, - saveButtonLoading: { - description: "Tells when the button should show loader icon", - }, - cancelButtonLabel: { description: "Translation string for cancel button" }, - maxSizeFileError: { description: "Translation string for size warning" }, - unknownTypeError: { - description: "Translation string for file type warning", - }, - onLoadFileError: { - description: "Translation string for load file warning", - }, - unknownError: { description: "Translation string for warning" }, - maxSize: { description: "Max size of image" }, - onSave: { description: "Save event" }, - onClose: { description: "Closing event " }, - onDeleteImage: { description: "Image deletion event" }, - onLoadFile: { description: "Image upload event" }, - onImageChange: { description: "Image change event" }, - className: { description: "Accepts class" }, - id: { description: "Accepts id" }, - style: { description: "Accepts css style" }, openEditor: { action: "onOpen", table: { disable: true } }, closeEditor: { action: "onClose", table: { disable: true } }, onSave: { action: "onSave", table: { disable: true } }, @@ -55,33 +18,11 @@ export default { description: { component: "Used to display user avatar editor on page.", }, - source: { - code: ` - import AvatarEditor from "@appserver/components/avatar-editor"; - - {}} - onSave={() => {})} - onDeleteImage={() => {})} - onImageChange={() => {})} - onLoadFile={() => {}} - headerLabel="Edit Photo" - selectNewPhotoLabel="Select new photo" - orDropFileHereLabel="or drop file here" - saveButtonLabel="Save" - maxSizeFileError="Maximum file size exceeded" - unknownTypeError="Unknown image file type" - unknownError="Error" - displayType="auto" -/> - `, - }, }, }, }; -class Wrapper extends React.Component { +class AvatarEditor extends React.Component { constructor(props) { super(props); @@ -145,7 +86,7 @@ class Wrapper extends React.Component { editAction={this.openEditor} /> {this.props.children} - { - return ; + return ; }; export const Default = Template.bind({}); diff --git a/packages/asc-web-components/avatar-editor/avatar-editor.stories.mdx b/packages/asc-web-components/avatar-editor/avatar-editor.stories.mdx new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/asc-web-components/avatar-editor/index.js b/packages/asc-web-components/avatar-editor/index.js index 6ff6cf231b..5447358c93 100644 --- a/packages/asc-web-components/avatar-editor/index.js +++ b/packages/asc-web-components/avatar-editor/index.js @@ -223,30 +223,53 @@ class AvatarEditor extends React.Component { } AvatarEditor.propTypes = { + /** Display avatar editor */ visible: PropTypes.bool, + /** Translation string for title */ headerLabel: PropTypes.string, + /** Translation string for file selection */ selectNewPhotoLabel: PropTypes.string, + /** Translation string for file dropping (concat with selectNewPhotoLabel prop) */ orDropFileHereLabel: PropTypes.string, - + /** Translation string for save button */ saveButtonLabel: PropTypes.string, + /** Translation string for cancel button */ cancelButtonLabel: PropTypes.string, + /** Tells when the button should show loader icon */ saveButtonLoading: PropTypes.bool, + /** Translation string for size warning */ maxSizeFileError: PropTypes.string, + /** Display avatar editor */ image: PropTypes.string, + /** Max size of image */ maxSize: PropTypes.number, + /** Accepted file types */ accept: PropTypes.arrayOf(PropTypes.string), + /** Save event */ onSave: PropTypes.func, + /** Closing event */ onClose: PropTypes.func, + /** Image deletion event */ onDeleteImage: PropTypes.func, + /** Image upload event */ onLoadFile: PropTypes.func, + /** Image change event */ onImageChange: PropTypes.func, + /** Translation string for load file warning */ onLoadFileError: PropTypes.func, + /** Translation string for file type warning */ unknownTypeError: PropTypes.string, + /** Translation string for warning */ unknownError: PropTypes.string, + /** Display type */ displayType: PropTypes.oneOf(["auto", "modal", "aside"]), + /** Accepts class" */ className: PropTypes.string, + /** Accepts id */ id: PropTypes.string, + /** Accepts css style */ style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), + /** Use for the view of the modal dialog or not */ useModalDialog: PropTypes.bool, }; diff --git a/packages/asc-web-components/backdrop/backdrop.stories.js b/packages/asc-web-components/backdrop/backdrop.stories.js index 13eb96d585..8e9e431004 100644 --- a/packages/asc-web-components/backdrop/backdrop.stories.js +++ b/packages/asc-web-components/backdrop/backdrop.stories.js @@ -6,21 +6,8 @@ import Button from "../button"; export default { title: "Components/Backdrop", component: Backdrop, + subcomponents: { Button }, argTypes: { - visible: { - description: "Display or not", - }, - zIndex: { - description: "CSS z-index", - }, - className: { description: "Accepts class" }, - id: { description: "Accepts id" }, - style: { description: "Accepts CSS style" }, - withBackground: { - description: - "The background is not displayed if the viewport width is less than 1024, set it to true for display", - }, - isAside: { description: "Must be true if used with Aside component" }, onClick: { action: "On Hide", table: { disable: true } }, }, parameters: { @@ -28,12 +15,6 @@ export default { description: { component: "Backdrop for displaying modal dialogs or other components", }, - source: { - code: ` - import Backdrop from "@appserver/components/backdrop"; - -`, - }, }, }, }; diff --git a/packages/asc-web-components/backdrop/index.js b/packages/asc-web-components/backdrop/index.js index 5b2c232891..dac13a61df 100644 --- a/packages/asc-web-components/backdrop/index.js +++ b/packages/asc-web-components/backdrop/index.js @@ -99,12 +99,20 @@ class Backdrop extends React.Component { } Backdrop.propTypes = { + /** Display or not */ visible: PropTypes.bool, + /** CSS z-index */ zIndex: PropTypes.number, + /** Accepts class */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.array]), + /** Accepts id */ id: PropTypes.string, + /** Accepts css style */ style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), + /** The background is not displayed if the viewport width is less than 1024, + * set it to true for display */ withBackground: PropTypes.bool, + /** Must be true if used with Aside component */ isAside: PropTypes.bool, }; diff --git a/packages/asc-web-components/badge/badge.stories.js b/packages/asc-web-components/badge/badge.stories.js index 423d6d3e70..441e8ca543 100644 --- a/packages/asc-web-components/badge/badge.stories.js +++ b/packages/asc-web-components/badge/badge.stories.js @@ -10,39 +10,8 @@ export default { description: { component: "Used for buttons, numbers or status markers next to icons.", }, - source: { - code: ` - import Badge from "@appserver/components/badge"; - - {}} -/> - `, - }, }, }, - argTypes: { - backgroundColor: { control: "color", description: "CSS background-color" }, - color: { control: "color", description: "CSS color" }, - label: { control: "text", description: "Value" }, - borderRadius: { description: "CSS border-radius" }, - className: { description: "Accepts class" }, - fontSize: { description: "CSS font-size" }, - fontWeight: { description: "CSS font-weight" }, - id: { description: "Accepts id" }, - maxWidth: { description: "CSS max-width" }, - onClick: { description: "onClick event" }, - padding: { description: "CSS padding" }, - style: { description: "Accepts css style" }, - }, }; const Template = (args) => ; diff --git a/packages/asc-web-components/badge/index.js b/packages/asc-web-components/badge/index.js index db40df8cfc..e5bc04118b 100644 --- a/packages/asc-web-components/badge/index.js +++ b/packages/asc-web-components/badge/index.js @@ -42,17 +42,29 @@ const Badge = (props) => { }; Badge.propTypes = { + /** Value */ label: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), + /** CSS background-color */ backgroundColor: PropTypes.string, + /** CSS color */ color: PropTypes.string, + /** CSS font-size */ fontSize: PropTypes.string, + /** CSS font-weight */ fontWeight: PropTypes.number, + /** CSS border-radius */ borderRadius: PropTypes.string, + /** CSS padding */ padding: PropTypes.string, + /** CSS max-width */ maxWidth: PropTypes.string, + /** onClick event */ onClick: PropTypes.func, + /** Accepts class */ className: PropTypes.string, + /** Accepts id */ id: PropTypes.string, + /** Accepts css style */ style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), }; diff --git a/packages/asc-web-components/box/box.stories.js b/packages/asc-web-components/box/box.stories.js index 69f756911e..ae2d598fda 100644 --- a/packages/asc-web-components/box/box.stories.js +++ b/packages/asc-web-components/box/box.stories.js @@ -1,6 +1,5 @@ import React from "react"; -//import { Box } from "./"; import Box from "./"; const containerProps = { diff --git a/packages/asc-web-components/button/button.stories.js b/packages/asc-web-components/button/button.stories.js index 5de58e0d8c..6bf53c8d3a 100644 --- a/packages/asc-web-components/button/button.stories.js +++ b/packages/asc-web-components/button/button.stories.js @@ -6,53 +6,13 @@ import Button from "./"; export default { title: "Components/Button", component: Button, - argTypes: { - label: { description: "Button text" }, - size: { description: "Size of button" }, - primary: { description: "Tells when the button should be primary" }, - scale: { description: "Scale width of button to 100%" }, - isClicked: { - description: "Tells when the button should present a clicked state", - }, - isDisabled: { - description: "Tells when the button should present a disabled state", - }, - isHovered: { - description: "Tells when the button should present a hovered state", - }, - isLoading: { description: "Tells when the button should show loader icon" }, - disableHover: { description: "Disable hover effect" }, - icon: { description: "Icon node element" }, - onClick: { description: "What the button will trigger when clicked " }, - className: { description: "Accepts class" }, - id: { description: "Accepts id" }, - style: { description: "Accepts CSS style" }, - tabIndex: { description: "Button tab index" }, - minwidth: { description: "Sets the nim width of the button" }, - }, parameters: { docs: { description: { component: "Button is used for a action on a page.", }, - source: { - code: ` - import Button from "@appserver/components/button"; - -