From 96dade90dc6ab180cffd3b3bec7a394ff395a56e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Pot=C4=99pa?= Date: Mon, 6 Nov 2023 10:14:26 +0100 Subject: [PATCH] Revert "Chore/review components (#93)" (#94) This reverts commit 3e62507b481862f1a126d46af75f44554d0b73e0. --- README.md | 35 ------- package.json | 2 +- .../AlertBanner/AlertBanner.stories.tsx | 9 +- .../AlertBanner/AlertBanner.styles.ts | 10 +- .../AlertBanner/AlertBanner.test.tsx | 4 +- .../types/AlertBannerIntent.type.ts | 2 +- src/components/Avatar/Avatar.stories.tsx | 5 +- src/components/Avatar/Avatar.styles.ts | 2 +- src/components/Avatar/Avatar.tsx | 2 +- .../Avatar/types/AvatarAppearance.type.ts | 35 ++++--- src/components/Badge/Badge.stories.tsx | 9 -- src/components/Badge/Badge.styles.ts | 2 +- src/components/Badge/Badge.tsx | 6 +- src/components/Button/Button.stories.tsx | 10 -- src/components/Button/Button.styles.ts | 4 +- src/components/Button/Button.tsx | 6 +- .../stylesBuilder/stylesBuilder.test.ts | 2 +- src/components/Checkbox/Checkbox.props.ts | 9 +- src/components/Checkbox/Checkbox.stories.tsx | 13 +-- src/components/Checkbox/Checkbox.test.tsx | 23 ++--- src/components/Checkbox/Checkbox.tsx | 16 +--- .../CheckboxGroup/CheckboxGroup.tsx | 14 +-- src/components/Counter/Counter.tsx | 2 +- src/components/Divider/Divider.stories.tsx | 5 - src/components/Divider/Divider.tsx | 2 +- src/components/HelperText/HelperText.props.ts | 2 +- .../HelperText/HelperText.stories.tsx | 2 +- src/components/HelperText/HelperText.test.tsx | 10 +- src/components/HelperText/HelperText.tsx | 4 +- .../IconButton/IconButton.styles.ts | 6 +- src/components/IconButton/IconButton.tsx | 6 +- .../InlineBanner/InlineBanner.styles.ts | 1 - src/components/InlineBanner/InlineBanner.tsx | 9 +- .../InlineMessage/InlineMessage.tsx | 6 +- .../InlineSearchInput/InlineSearchInput.tsx | 6 +- src/components/Label/Label.tsx | 4 +- src/components/Loader/Loader.tsx | 10 +- src/components/Popover/Popover.styles.ts | 2 +- src/components/Popover/Popover.tsx | 2 +- .../RadioButton/RadioButton.stories.tsx | 1 - src/components/RadioButton/RadioButton.tsx | 22 +---- .../RadioButtonGroup/RadioButtonGroup.tsx | 8 +- src/components/SearchInput/SearchInput.tsx | 8 +- src/components/Select/Select.test.tsx | 6 +- src/components/Select/Select.tsx | 92 ++----------------- src/components/SocialButton/SocialButton.tsx | 2 +- src/components/SocialButton/socials/Apple.tsx | 4 +- .../SocialButton/socials/Facebook.tsx | 14 +-- src/components/SocialButton/socials/Figma.tsx | 22 ++--- .../SocialButton/socials/Github.tsx | 4 +- .../SocialButton/socials/Google.tsx | 20 ++-- .../SocialButton/socials/Twitter.tsx | 4 +- .../SocialButton/socials/WithLoader.tsx | 2 +- .../SocialButton/socials/socials.ts | 6 +- src/components/StatusDot/StatusDot.props.ts | 3 +- .../StatusDot/StatusDot.stories.tsx | 4 +- src/components/StatusDot/StatusDot.styles.ts | 4 +- src/components/StatusDot/StatusDot.test.tsx | 4 +- src/components/StatusDot/StatusDot.tsx | 8 +- .../StatusDot/stylesBuilder/stylesBuilder.ts | 8 +- src/components/Tag/Tag.tsx | 10 +- src/components/TextInput/TextInput.styles.ts | 1 - src/components/TextInput/TextInput.tsx | 64 +++++++++---- src/components/TextInput/useTextInput.ts | 67 -------------- src/components/Toast/Toast.styles.ts | 4 +- src/components/Toast/Toast.tsx | 2 +- .../Toast/stylesBuilder/stylesBuilder.ts | 8 +- src/docs-components/AlertBannerDocs.tsx | 8 +- src/docs-components/AvatarDocs.tsx | 4 +- src/docs-components/BadgeDocs.tsx | 60 +++++------- src/docs-components/ButtonDocs/ButtonDocs.tsx | 4 +- src/docs-components/ButtonDocs/ButtonRow.tsx | 2 +- src/docs-components/CheckboxDocs.tsx | 58 +++++------- src/docs-components/HelperTextDocs.tsx | 2 +- src/docs-components/IconButtonDocs.tsx | 1 - src/docs-components/RadioButtonDocs.tsx | 35 +++---- src/docs-components/StatusDotDocs.tsx | 2 +- src/docs-components/TagDocs.tsx | 4 +- src/docs-components/TetDocs.tsx | 2 +- src/docs-components/common/Cols.tsx | 8 +- src/docs-components/common/Hero.tsx | 2 +- src/docs-components/common/SectionHeader.tsx | 8 +- src/docs-components/common/States.tsx | 52 ++++------- src/index.ts | 1 - 84 files changed, 328 insertions(+), 626 deletions(-) delete mode 100644 src/components/TextInput/useTextInput.ts diff --git a/README.md b/README.md index 15780f65..cd335c65 100644 --- a/README.md +++ b/README.md @@ -191,41 +191,6 @@ If you want to dive deeper into the components Tetrisly offers, check out our of You can also check out our Storybook, which is our Documentation for React components (now in progress): [Tetrisly Storybook](https://virtuslab.github.io/tetrisly-react/?path=/docs/alertbanner--docs) -## Customization - -All Tetrisly components have a `custom` prop. It makes it possible to customize the component without the need to create a new one. Below you can see an example of Button customization - -### Button - -If you want to change any of button styles, you can make it by passing custom props with object based on -specific component config. - -For instance, to change background-color of appereance="primary" intent="secondary" variant to pink, just pass -refferenced object structure: - -```jsx -