From b8ff8d5377f61c49bf265c9f7776589e9fe1f4b6 Mon Sep 17 00:00:00 2001 From: Haider Alshamma Date: Mon, 28 Oct 2024 11:47:30 -0400 Subject: [PATCH] fix: remove obsolete stories --- src/Breadcrumbs/Breadcrumbs.story.tsx | 17 ------ src/Button/IconicButton.story.tsx | 14 ----- src/Checkbox/Checkbox.story.tsx | 10 ---- src/Checkbox/Checkbox.tsx | 4 +- src/DatePicker/DatePicker.story.tsx | 35 ------------ src/DateRange/DateRange.story.tsx | 39 -------------- src/DropdownMenu/DropdownMenu.story.tsx | 36 ------------- src/Input/Input.story.tsx | 37 ------------- src/Link/Link.story.tsx | 16 ------ src/Radio/Radio.story.tsx | 10 ---- src/Select/Select.story.tsx | 72 ------------------------- src/Switcher/Switcher.story.tsx | 30 ----------- src/Tabs/Tabs.story.tsx | 19 ------- src/Textarea/Textarea.story.tsx | 15 ------ src/TimePicker/TimePicker.story.tsx | 18 ------- src/Toggle/Toggle.story.tsx | 22 -------- 16 files changed, 1 insertion(+), 393 deletions(-) diff --git a/src/Breadcrumbs/Breadcrumbs.story.tsx b/src/Breadcrumbs/Breadcrumbs.story.tsx index 460606587..6eaa481d5 100644 --- a/src/Breadcrumbs/Breadcrumbs.story.tsx +++ b/src/Breadcrumbs/Breadcrumbs.story.tsx @@ -24,23 +24,6 @@ export const _Breadcrumbs = () => ( const DashedBreadcrumbs = dashed(Breadcrumbs); -export const WithDifferentVariants = () => ( - - - Default - Size - - - Desktop - Size - - - Touch - Size - - -); - export const WithoutLink = () => ( Home diff --git a/src/Button/IconicButton.story.tsx b/src/Button/IconicButton.story.tsx index 87e6c773e..ef28472fa 100644 --- a/src/Button/IconicButton.story.tsx +++ b/src/Button/IconicButton.story.tsx @@ -127,20 +127,6 @@ export const WithACustomFontSize = () => ( const DashedIconicButton = dashed(IconicButton); -export const WithDifferentVariants = () => ( - - - Default size - - - Desktop size - - - Touch size - - -); - WithACustomFontSize.story = { name: "with a custom font size", }; diff --git a/src/Checkbox/Checkbox.story.tsx b/src/Checkbox/Checkbox.story.tsx index d23f44312..eae79c952 100644 --- a/src/Checkbox/Checkbox.story.tsx +++ b/src/Checkbox/Checkbox.story.tsx @@ -98,16 +98,6 @@ SetToRequired.story = { name: "Set to required", }; -const DashedCheckbox = dashed(Checkbox); - -export const WithDifferentVariants = () => ( - - - - - -); - export const Indeterminate = () => ( <> diff --git a/src/Checkbox/Checkbox.tsx b/src/Checkbox/Checkbox.tsx index 3062f004c..f82a34a99 100644 --- a/src/Checkbox/Checkbox.tsx +++ b/src/Checkbox/Checkbox.tsx @@ -128,9 +128,7 @@ const CheckboxInput = styled.input((props) => ({ }, })); -type Ref = HTMLInputElement; - -const Checkbox = forwardRef((props, ref) => { +const Checkbox = forwardRef((props, ref) => { const { variant, className, labelText, disabled, checked, required, error, indeterminate } = props; const componentVariant = useComponentVariant(variant); diff --git a/src/DatePicker/DatePicker.story.tsx b/src/DatePicker/DatePicker.story.tsx index a6f12dfe9..3775bbf40 100644 --- a/src/DatePicker/DatePicker.story.tsx +++ b/src/DatePicker/DatePicker.story.tsx @@ -4,7 +4,6 @@ import { action } from "@storybook/addon-actions"; import { select, boolean } from "@storybook/addon-knobs"; import { DatePicker, Button } from "../index"; -import { Flex } from "../Flex"; const selectedDateExamples = [ new Date("2019-01-01T05:00:00.000Z"), @@ -47,40 +46,6 @@ WithCustomDateFormat.story = { name: "with custom date format", }; -export const WithDifferentVariants = () => ( - - - - - -); - export const WithCustomPlaceholder = () => ( ( /> ); -export const WithDifferentVariants = () => ( - - - - - - - -); - export const DefaultStartAndEndDate = () => ( ( - - Default menu} - defaultOpen - openAriaLabel="open dropdown" - closeAriaLabel="close dropdown" - > - Dropdown Link - {}}>Dropdown Button - - - Medium menu} - defaultOpen - openAriaLabel="open dropdown" - closeAriaLabel="close dropdown" - variant="desktop" - > - Dropdown Link - {}}>Dropdown Button - - - Large menu} - defaultOpen - openAriaLabel="open dropdown" - closeAriaLabel="close dropdown" - variant="touch" - > - Dropdown Link - {}}>Dropdown Button - - -); - export const WithButtonClosingMenu = () => ( {({ closeMenu }) => Dropdown Button} diff --git a/src/Input/Input.story.tsx b/src/Input/Input.story.tsx index 1911c5565..ea1659de9 100644 --- a/src/Input/Input.story.tsx +++ b/src/Input/Input.story.tsx @@ -27,43 +27,6 @@ WithAllProps.story = { name: "with all props", }; -export const WithDifferentVariants = () => ( - - - - - -); - export const SetToDisabled = () => ( ); diff --git a/src/Link/Link.story.tsx b/src/Link/Link.story.tsx index 7f7dfc481..d0fdc4de9 100644 --- a/src/Link/Link.story.tsx +++ b/src/Link/Link.story.tsx @@ -50,22 +50,6 @@ export const WithADifferentFontSize = () => ( ); -const DashedLink = dashed(Link); - -export const WithDifferentVariants = () => ( - - Default Link - - - Desktop Link - - - - Touch Link - - -); - export const AsAButton = () => Link; AsAButton.story = { diff --git a/src/Radio/Radio.story.tsx b/src/Radio/Radio.story.tsx index 7e8f1f579..57ee62dbf 100644 --- a/src/Radio/Radio.story.tsx +++ b/src/Radio/Radio.story.tsx @@ -31,16 +31,6 @@ SetToDisabled.story = { name: "Set to disabled", }; -const DashedRadio = dashed(Radio); - -export const WithDifferentVariants = () => ( - - - - - -); - export const SetToError = () => ( <> diff --git a/src/Select/Select.story.tsx b/src/Select/Select.story.tsx index 89734dd97..23f3f0581 100644 --- a/src/Select/Select.story.tsx +++ b/src/Select/Select.story.tsx @@ -143,78 +143,6 @@ export const _Select = () => ( /> ); -export const WithDifferentVariants = () => { - return ( - - Standard - - - "No options"} - placeholder="Please select inventory status" - options={PCNList} - labelText="Default Size" - multiselect - /> - "No options"} - placeholder="Please select inventory status" - options={PCNList} - labelText="Touch Size" - multiselect - /> - - - ); -}; - export const WithABlankValue = () => { const optionsWithBlank = [{ value: null, label: "" }, ...options]; return ( diff --git a/src/Switcher/Switcher.story.tsx b/src/Switcher/Switcher.story.tsx index 252e028b4..f2b40c6cc 100644 --- a/src/Switcher/Switcher.story.tsx +++ b/src/Switcher/Switcher.story.tsx @@ -17,36 +17,6 @@ export const WithSelectedValue = () => { ); }; -export const WithDifferentVariants = () => { - const [selectedDefault, setSelectedDefault] = useState("option_1"); - const [selectedMedium, setSelectedMedium] = useState("option_1"); - const [selectedLarge, setSelectedLarge] = useState("option_1"); - - return ( - - - Default - Size - - - - Medium - Size - - - - Large - Size - - - ); -}; - export const WithOtherInteractiveElements = () => ( diff --git a/src/Tabs/Tabs.story.tsx b/src/Tabs/Tabs.story.tsx index 40d4520d4..c8fa6709d 100644 --- a/src/Tabs/Tabs.story.tsx +++ b/src/Tabs/Tabs.story.tsx @@ -183,22 +183,3 @@ export const WithConditionallyRenderedTabs = () => ( {true && Shown tab 2} ); - -export const WithDifferentVariants = () => ( - - - Tab 1 Content - Tab 2 Content - - - - Tab 1 Content - Tab 2 Content - - - - Tab 1 Content - Tab 2 Content - - -); diff --git a/src/Textarea/Textarea.story.tsx b/src/Textarea/Textarea.story.tsx index 7c4dbbedf..7fcb54681 100644 --- a/src/Textarea/Textarea.story.tsx +++ b/src/Textarea/Textarea.story.tsx @@ -70,18 +70,3 @@ export const UsingRefToControlFocus = () => { ); }; - -export const WithDifferentVariants = () => { - return ( - -