From 5b81dcb010e0e2b94dde6269b103a97f2c80996c Mon Sep 17 00:00:00 2001 From: "margi.shah1" Date: Wed, 24 Jul 2024 11:36:01 +0530 Subject: [PATCH] fix: linting error and warning in storybook --- .eslintrc.json | 2 +- src/components/basic/Alert/Alert.stories.tsx | 9 ++++--- .../basic/BaseImage/BaseImage.stories.tsx | 8 +++--- .../basic/Breadcrumb/Breadcrumb.stories.tsx | 22 ++++++++++------ .../basic/Button/BackButton.stories.tsx | 8 +++--- .../basic/Button/LoadMoreButton.stories.tsx | 8 +++--- .../Button/ScrollToTopButton.stories.tsx | 8 +++--- .../basic/Carousel/Carousel.stories.tsx | 6 +++-- .../basic/Carousel/CarouselBox.stories.tsx | 6 +++-- .../CategoryDivider.stories.tsx | 8 +++--- .../basic/Checkbox/Checkbox.stories.tsx | 8 +++--- .../basic/Chip/DraggableChip.stories.tsx | 8 +++--- src/components/basic/Chip/chip.stories.tsx | 16 +++++++----- .../circularProgress.stories.tsx | 8 +++--- .../CustomAccordion.stories.tsx | 22 ++++++++-------- .../basic/Datepicker/Datepicker.stories.tsx | 12 ++++++--- .../basic/Dialog/Dialog.stories.tsx | 6 +++-- .../basic/Dialog/DialogActions.stories.tsx | 6 +++-- .../basic/Dialog/DialogHeader.stories.tsx | 8 +++--- .../DropdownMenu/DropdownMenu.stories.tsx | 12 ++++++--- .../basic/Dropzone/DropArea.stories.tsx | 8 +++--- .../basic/Dropzone/DropPreview.stories.tsx | 6 +++-- .../Dropzone/DropPreviewFile.stories.tsx | 6 +++-- .../basic/ErrorBar/ErrorBar.stories.tsx | 8 +++--- .../basic/ErrorPage/ErrorPage.stories.tsx | 16 +++++++----- .../basic/Expand/Expand.stories.tsx | 8 +++--- .../Headers/MainHeader/MainHeader.stories.tsx | 8 +++--- .../Headers/PageHeader/PageHeader.stories.tsx | 8 +++--- .../basic/IconButton/IconButton.stories.tsx | 8 +++--- src/components/basic/Image/Image.stories.tsx | 8 +++--- .../ImageGallery/ImageGallery.stories.tsx | 8 +++--- .../ImageGallery/ImageGalleryItem.stories.tsx | 8 +++--- src/components/basic/Input/Input.stories.tsx | 8 +++--- .../LanguageSwitch/LanguageSwitch.stories.tsx | 8 +++--- .../LoadingButton/LoadingButton.stories.tsx | 8 +++--- src/components/basic/Logo/Logo.stories.tsx | 8 +++--- .../MainNavigation/MainNavigation.stories.tsx | 8 +++--- src/components/basic/Menu/Menu.stories.tsx | 8 +++--- .../MultiSelectList.stories.tsx | 16 +++++++----- .../NewSubNavigation.stories.tsx | 20 +++++++++----- .../PageNotification.stories.tsx | 12 +++++---- .../Snackbar/PageSnackbar.stories.tsx | 8 +++--- .../Snackbar/PageSnackbarStack.stories.tsx | 6 +++-- .../OrderStatusButton.stories.tsx | 8 +++--- .../basic/ProcessList/ProcessList.stories.tsx | 8 +++--- .../CircleProgress/CircleProgress.stories.tsx | 8 +++--- .../LinearProgressWithValueLabel.stories.tsx | 8 +++--- .../basic/QuickLinks/QuickLinks.stories.tsx | 5 +++- src/components/basic/Radio/Radio.stories.tsx | 8 +++--- .../basic/Rating/Rating.stories.tsx | 8 +++--- .../basic/SearchInput/SearchInput.stories.tsx | 8 +++--- .../basic/SelectList/SelectList.stories.tsx | 12 +++++---- .../basic/SideMenu/SideMenu.stories.tsx | 8 +++--- .../basic/SortOption/SortOption.stories.tsx | 6 +++-- .../basic/StaticTable/StaticTable.stories.tsx | 16 +++++++----- .../basic/Stepper/Stepper.stories.tsx | 8 +++--- .../SubNavigation/SubNavigation.stories.tsx | 20 +++++++++----- .../StatusTag/statusTag.stories.tsx | 8 +++--- src/components/basic/Table/table.stories.tsx | 26 ++++++++++++------- .../basic/Tabs/TabPanel.stories.tsx | 8 +++--- src/components/basic/Tabs/Tabs.stories.tsx | 6 ++--- .../basic/Textarea/Textarea.stories.tsx | 8 +++--- .../basic/ToolTips/ToolTips.stories.tsx | 6 +++-- .../basic/UserAvatar/UserAvatar.stories.tsx | 12 ++++----- .../VerticalTabs/VerticalTabs.stories.tsx | 12 ++++----- .../ViewSelector/ViewSelector.stories.tsx | 14 +++++----- .../content/Cards/AboutCard.stories.tsx | 8 +++--- .../content/Cards/AppCards.stories.tsx | 8 +++--- .../content/Cards/CardAddService.stories.tsx | 8 +++--- .../content/Cards/CardDecision.stories.tsx | 10 +++---- .../content/Cards/CardHorizontal.stories.tsx | 8 +++--- .../content/Cards/ContentCard.stories.tsx | 8 +++--- .../content/Cards/MarketplaceCard.stories.tsx | 14 +++++----- .../content/Navigation/Navigation.stories.tsx | 8 +++--- .../content/UserMenu/UserMenu.stories.tsx | 6 +++-- .../content/UserNav/UserNav.stories.tsx | 8 +++--- 76 files changed, 399 insertions(+), 319 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 97f090a7..a0e3d6c4 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,5 +1,5 @@ { - "ignorePatterns": ["*.test.tsx", "*.stories.tsx", "*.config.ts"], + "ignorePatterns": ["*.test.tsx", "*.config.ts"], "env": { "browser": true, "es2021": true diff --git a/src/components/basic/Alert/Alert.stories.tsx b/src/components/basic/Alert/Alert.stories.tsx index 9544e2fb..b440f3e8 100644 --- a/src/components/basic/Alert/Alert.stories.tsx +++ b/src/components/basic/Alert/Alert.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Alert as Component } from '.' @@ -30,9 +30,10 @@ export default { children: {}, }, } -const Template: ComponentStory = (args: any) => ( - {args.children} -) + +const Template: ComponentStory = ( + args: React.ComponentProps +) => {args.children} export const Alert = Template.bind({}) Alert.args = { diff --git a/src/components/basic/BaseImage/BaseImage.stories.tsx b/src/components/basic/BaseImage/BaseImage.stories.tsx index 021ce765..182669ad 100644 --- a/src/components/basic/BaseImage/BaseImage.stories.tsx +++ b/src/components/basic/BaseImage/BaseImage.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { BaseImage as Component } from '.' @@ -28,9 +28,9 @@ export default { tags: ['autodocs'], } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const BaseImage = Template.bind({}) BaseImage.args = { diff --git a/src/components/basic/Breadcrumb/Breadcrumb.stories.tsx b/src/components/basic/Breadcrumb/Breadcrumb.stories.tsx index f964136b..a4d7546e 100644 --- a/src/components/basic/Breadcrumb/Breadcrumb.stories.tsx +++ b/src/components/basic/Breadcrumb/Breadcrumb.stories.tsx @@ -19,7 +19,7 @@ ********************************************************************************/ import { Link, Typography } from '@mui/material' -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Breadcrumb as Component } from '.' @@ -36,7 +36,9 @@ const breadcrumbs = [ key="1" color="inherit" sx={{ cursor: 'pointer' }} - onClick={() => console.log('navigate to home')} + onClick={() => { + console.log('navigate to home') + }} > Home , @@ -45,7 +47,9 @@ const breadcrumbs = [ key="2" color="inherit" sx={{ cursor: 'pointer' }} - onClick={() => console.log('navigate to Breackcrumb 1')} + onClick={() => { + console.log('navigate to Breackcrumb 1') + }} > Breadcrumb 1 , @@ -54,14 +58,16 @@ const breadcrumbs = [ , ] -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const Breadcrumb = Template.bind({}) Breadcrumb.args = { backButtonLabel: 'Back', backButtonVariant: 'outlined', - onBackButtonClick: () => console.log('Back button clicked!'), - breadcrumbs: breadcrumbs, + onBackButtonClick: () => { + console.log('Back button clicked!') + }, + breadcrumbs, } diff --git a/src/components/basic/Button/BackButton.stories.tsx b/src/components/basic/Button/BackButton.stories.tsx index fccd892b..e9896922 100644 --- a/src/components/basic/Button/BackButton.stories.tsx +++ b/src/components/basic/Button/BackButton.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import type { ComponentStory } from '@storybook/react' import { BackButton as Component } from './BackButton' import button from '../../../../docs/storybook/button.md?raw' @@ -39,9 +39,9 @@ export default { }, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const BackButton = Template.bind({}) BackButton.args = { diff --git a/src/components/basic/Button/LoadMoreButton.stories.tsx b/src/components/basic/Button/LoadMoreButton.stories.tsx index 92289f7c..c071d890 100644 --- a/src/components/basic/Button/LoadMoreButton.stories.tsx +++ b/src/components/basic/Button/LoadMoreButton.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { LoadMoreButton as Component } from './LoadMoreButton' @@ -29,9 +29,9 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const LoadMoreButton = Template.bind({}) LoadMoreButton.args = { diff --git a/src/components/basic/Button/ScrollToTopButton.stories.tsx b/src/components/basic/Button/ScrollToTopButton.stories.tsx index 1142d719..4f22f053 100644 --- a/src/components/basic/Button/ScrollToTopButton.stories.tsx +++ b/src/components/basic/Button/ScrollToTopButton.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { ScrollToTopButton as Component } from './ScrollToTopButton' @@ -33,9 +33,9 @@ export default { }, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const ScrollToTopButton = Template.bind({}) ScrollToTopButton.args = { diff --git a/src/components/basic/Carousel/Carousel.stories.tsx b/src/components/basic/Carousel/Carousel.stories.tsx index 3418e4f8..d60a3c38 100644 --- a/src/components/basic/Carousel/Carousel.stories.tsx +++ b/src/components/basic/Carousel/Carousel.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Carousel as Component } from '.' import { theme } from '../../../theme' import uniqueId from 'lodash/uniqueId' @@ -40,7 +40,9 @@ const itemsArray = [ 'Element 5', ] -const Template: ComponentStory = (args: any) => ( +const Template: ComponentStory = ( + args: React.ComponentProps +) => ( {itemsArray.map((item: string) => { return ( diff --git a/src/components/basic/Carousel/CarouselBox.stories.tsx b/src/components/basic/Carousel/CarouselBox.stories.tsx index a6e2e816..d5ae834f 100644 --- a/src/components/basic/Carousel/CarouselBox.stories.tsx +++ b/src/components/basic/Carousel/CarouselBox.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { CarouselBox as Component } from './CarouselBox' import { theme } from '../../../theme' import uniqueId from 'lodash/uniqueId' @@ -40,7 +40,9 @@ const itemsArray = [ 'Element 5', ] -const Template: ComponentStory = (args: any) => ( +const Template: ComponentStory = ( + args: React.ComponentProps +) => ( {itemsArray.map((item: string) => { return ( diff --git a/src/components/basic/CategoryDivider/CategoryDivider.stories.tsx b/src/components/basic/CategoryDivider/CategoryDivider.stories.tsx index faafbb4f..8992960b 100644 --- a/src/components/basic/CategoryDivider/CategoryDivider.stories.tsx +++ b/src/components/basic/CategoryDivider/CategoryDivider.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { CategoryDivider as Component } from '.' @@ -29,9 +29,9 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const CategoryDivider = Template.bind({}) CategoryDivider.args = { diff --git a/src/components/basic/Checkbox/Checkbox.stories.tsx b/src/components/basic/Checkbox/Checkbox.stories.tsx index 7166a61c..77afdeaa 100644 --- a/src/components/basic/Checkbox/Checkbox.stories.tsx +++ b/src/components/basic/Checkbox/Checkbox.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Checkbox as Component } from '.' @@ -33,9 +33,9 @@ export default { }, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const Checkbox = Template.bind({}) Checkbox.args = { diff --git a/src/components/basic/Chip/DraggableChip.stories.tsx b/src/components/basic/Chip/DraggableChip.stories.tsx index 3c2f5691..8d7e6760 100644 --- a/src/components/basic/Chip/DraggableChip.stories.tsx +++ b/src/components/basic/Chip/DraggableChip.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { DraggableChip as Component } from './DraggableChip' @@ -33,8 +33,8 @@ export default { }, } -const Template: ComponentStory = (args: any) => ( - {args.children} -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => {args.children} export const DraggableChip = Template.bind({}) diff --git a/src/components/basic/Chip/chip.stories.tsx b/src/components/basic/Chip/chip.stories.tsx index 8ccc8a63..87d32db3 100644 --- a/src/components/basic/Chip/chip.stories.tsx +++ b/src/components/basic/Chip/chip.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Chip as Component } from '.' export default { @@ -29,9 +29,9 @@ export default { parameters: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const Chip = Template.bind({}) Chip.args = { @@ -39,7 +39,11 @@ Chip.args = { variant: 'filled', label: 'decline', type: 'decline', - onClick: () => console.log('Decline clicked'), + onClick: () => { + console.log('Decline clicked') + }, withIcon: true, - handleDelete: () => console.log('onDelete clicked'), + handleDelete: () => { + console.log('onDelete clicked') + }, } diff --git a/src/components/basic/CircularProgress/circularProgress.stories.tsx b/src/components/basic/CircularProgress/circularProgress.stories.tsx index bfb5e4e1..4423ebc1 100644 --- a/src/components/basic/CircularProgress/circularProgress.stories.tsx +++ b/src/components/basic/CircularProgress/circularProgress.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { CircularProgress as Component } from '.' @@ -28,8 +28,8 @@ export default { tags: ['autodocs'], } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const Loading = Template.bind({}) diff --git a/src/components/basic/CustomAccordion/CustomAccordion.stories.tsx b/src/components/basic/CustomAccordion/CustomAccordion.stories.tsx index e522ac8e..e079a07a 100644 --- a/src/components/basic/CustomAccordion/CustomAccordion.stories.tsx +++ b/src/components/basic/CustomAccordion/CustomAccordion.stories.tsx @@ -19,10 +19,10 @@ ********************************************************************************/ import { Box, Divider, Typography } from '@mui/material' -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { CustomAccordion as Component } from '.' import { Table } from '../StaticTable/StaticTable.stories' -import { CustomAccordionProps } from './Item' +import { type CustomAccordionProps } from './Item' import HomeOutlinedIcon from '@mui/icons-material/HomeOutlined' import SettingsOutlinedIcon from '@mui/icons-material/SettingsOutlined' @@ -35,11 +35,11 @@ export default { }, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => -const item_1_open: CustomAccordionProps = { +const item1Open: CustomAccordionProps = { expanded: true, id: 'panel-1', title: 'First Item', @@ -48,7 +48,7 @@ const item_1_open: CustomAccordionProps = { children: Content of the first item, } -const item_1_open_colored: CustomAccordionProps = { +const item1OpenColored: CustomAccordionProps = { expanded: false, id: 'panel-1', title: 'First Item', @@ -75,14 +75,14 @@ const item_1_open_colored: CustomAccordionProps = { ), } -const item_2_closed: CustomAccordionProps = { +const item2Closed: CustomAccordionProps = { expanded: false, id: 'panel-2', icon: , title: 'Second Item', children: Content of the second item, } -const item_3_closed: CustomAccordionProps = { +const item3Closed: CustomAccordionProps = { expanded: false, id: 'panel-3', title: 'Third Item', @@ -91,10 +91,10 @@ const item_3_closed: CustomAccordionProps = { export const BasicAccordion = Template.bind({}) BasicAccordion.args = { - items: [item_1_open, item_2_closed, item_3_closed], + items: [item1Open, item2Closed, item3Closed], } export const ColoredAccordion = Template.bind({}) ColoredAccordion.args = { - items: [item_1_open_colored, item_2_closed, item_3_closed], + items: [item1OpenColored, item2Closed, item3Closed], } diff --git a/src/components/basic/Datepicker/Datepicker.stories.tsx b/src/components/basic/Datepicker/Datepicker.stories.tsx index 1af30ebc..fcbc27ff 100644 --- a/src/components/basic/Datepicker/Datepicker.stories.tsx +++ b/src/components/basic/Datepicker/Datepicker.stories.tsx @@ -18,10 +18,10 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Box } from '@mui/material' -import { Datepicker as Component } from '.' +import { Datepicker as Component, type DateType } from '.' import datepicker from '../../../../docs/storybook/datepicker.md?raw' export default { @@ -36,7 +36,9 @@ export default { }, } -const Template: ComponentStory = (args: any) => ( +const Template: ComponentStory = ( + args: React.ComponentProps +) => ( @@ -56,5 +58,7 @@ DatePicker.args = { readOnly: false, daySelectedColor: '#0F71CB', todayColor: '#939393', - onChangeItem: (date: any) => console.log('date:', date), + onChangeItem: (date: DateType) => { + console.log('date:', date) + }, } diff --git a/src/components/basic/Dialog/Dialog.stories.tsx b/src/components/basic/Dialog/Dialog.stories.tsx index c71e423a..d84090bf 100644 --- a/src/components/basic/Dialog/Dialog.stories.tsx +++ b/src/components/basic/Dialog/Dialog.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Dialog as Component } from '.' import { Button } from '../Button' @@ -48,7 +48,9 @@ export default { }, } -const DialogTemplate: ComponentStory = (args: any) => { +const DialogTemplate: ComponentStory = ( + args: React.ComponentProps +) => { const { title, intro, content, helperText, ...componentArgs } = args return ( diff --git a/src/components/basic/Dialog/DialogActions.stories.tsx b/src/components/basic/Dialog/DialogActions.stories.tsx index 811348bc..f9b01b36 100644 --- a/src/components/basic/Dialog/DialogActions.stories.tsx +++ b/src/components/basic/Dialog/DialogActions.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { DialogActions as Component } from './DialogActions' import { Button } from '../Button' @@ -29,7 +29,9 @@ export default { tags: ['autodocs'], } -const Template: ComponentStory = (args: any) => ( +const Template: ComponentStory = ( + args: React.ComponentProps +) => ( diff --git a/src/components/basic/Dialog/DialogHeader.stories.tsx b/src/components/basic/Dialog/DialogHeader.stories.tsx index 577197a1..3843c20c 100644 --- a/src/components/basic/Dialog/DialogHeader.stories.tsx +++ b/src/components/basic/Dialog/DialogHeader.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { DialogHeader as Component } from './DialogHeader' @@ -28,9 +28,9 @@ export default { tags: ['autodocs'], } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const DialogHeader = Template.bind({}) DialogHeader.args = { diff --git a/src/components/basic/DropdownMenu/DropdownMenu.stories.tsx b/src/components/basic/DropdownMenu/DropdownMenu.stories.tsx index 39efab00..03e6d858 100644 --- a/src/components/basic/DropdownMenu/DropdownMenu.stories.tsx +++ b/src/components/basic/DropdownMenu/DropdownMenu.stories.tsx @@ -21,7 +21,7 @@ import EditIcon from '@mui/icons-material/Edit' import FileCopyIcon from '@mui/icons-material/FileCopy' import MenuItem from '@mui/material/MenuItem' -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { DropdownMenu as Component } from '.' import dropdown from '../../../../docs/storybook/selectlist/dropdown.md?raw' @@ -40,9 +40,15 @@ export default { }, } -const Template: ComponentStory = (args: any) => ( +const Template: ComponentStory = ( + args: React.ComponentProps +) => ( - console.log('edit!')}> + { + console.log('edit!') + }} + > Edit diff --git a/src/components/basic/Dropzone/DropArea.stories.tsx b/src/components/basic/Dropzone/DropArea.stories.tsx index a37f7e12..37aba522 100644 --- a/src/components/basic/Dropzone/DropArea.stories.tsx +++ b/src/components/basic/Dropzone/DropArea.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { DropArea as Component } from './components/DropArea' @@ -38,8 +38,8 @@ export default { }, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const DropArea = Template.bind({}) diff --git a/src/components/basic/Dropzone/DropPreview.stories.tsx b/src/components/basic/Dropzone/DropPreview.stories.tsx index 1d009c71..05bec356 100644 --- a/src/components/basic/Dropzone/DropPreview.stories.tsx +++ b/src/components/basic/Dropzone/DropPreview.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { DropPreview as Component } from './components/DropPreview' import { UploadStatus } from './types' @@ -62,7 +62,9 @@ export default { }, } -const Template: ComponentStory = (args: any) => ( +const Template: ComponentStory = ( + args: React.ComponentProps +) => ( ) diff --git a/src/components/basic/Dropzone/DropPreviewFile.stories.tsx b/src/components/basic/Dropzone/DropPreviewFile.stories.tsx index 98ae0a21..bf8ecb6e 100644 --- a/src/components/basic/Dropzone/DropPreviewFile.stories.tsx +++ b/src/components/basic/Dropzone/DropPreviewFile.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { DropPreviewFile as Component } from './components/DropPreviewFile' import { UploadStatus } from './types' @@ -53,7 +53,9 @@ export default { }, } -const Template: ComponentStory = (args: any) => { +const Template: ComponentStory = ( + args: React.ComponentProps +) => { const { name, size, status, progressPercent, ...props } = args return ( = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const ErrorBar = Template.bind({}) ErrorBar.args = { diff --git a/src/components/basic/ErrorPage/ErrorPage.stories.tsx b/src/components/basic/ErrorPage/ErrorPage.stories.tsx index 09a77c18..bf77a6da 100644 --- a/src/components/basic/ErrorPage/ErrorPage.stories.tsx +++ b/src/components/basic/ErrorPage/ErrorPage.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { ErrorPage as Component } from '.' @@ -29,9 +29,9 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const ErrorPage = Template.bind({}) ErrorPage.args = { @@ -43,7 +43,11 @@ ErrorPage.args = { additionalDescription: 'Please contact your admin.', reloadButtonTitle: 'Reload Page', homeButtonTitle: 'Homepage', - onReloadClick: () => console.log('reload'), - onHomeClick: () => console.log('home page'), + onReloadClick: () => { + console.log('reload') + }, + onHomeClick: () => { + console.log('home page') + }, color: 'gray', } diff --git a/src/components/basic/Expand/Expand.stories.tsx b/src/components/basic/Expand/Expand.stories.tsx index 324b44da..e5c2a8a0 100644 --- a/src/components/basic/Expand/Expand.stories.tsx +++ b/src/components/basic/Expand/Expand.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Expand as Component } from '.' @@ -33,9 +33,9 @@ export default { }, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const Expand = Template.bind({}) Expand.args = { diff --git a/src/components/basic/Headers/MainHeader/MainHeader.stories.tsx b/src/components/basic/Headers/MainHeader/MainHeader.stories.tsx index d8aaed89..c57d0477 100644 --- a/src/components/basic/Headers/MainHeader/MainHeader.stories.tsx +++ b/src/components/basic/Headers/MainHeader/MainHeader.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { MainHeader as Component } from './MainHeader' @@ -29,9 +29,9 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const MainHeader = Template.bind({}) MainHeader.args = { diff --git a/src/components/basic/Headers/PageHeader/PageHeader.stories.tsx b/src/components/basic/Headers/PageHeader/PageHeader.stories.tsx index 6a8f0dd9..8dffbae9 100644 --- a/src/components/basic/Headers/PageHeader/PageHeader.stories.tsx +++ b/src/components/basic/Headers/PageHeader/PageHeader.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { PageHeader as Component } from './PageHeader' @@ -29,9 +29,9 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const PageHeader = Template.bind({}) PageHeader.args = { diff --git a/src/components/basic/IconButton/IconButton.stories.tsx b/src/components/basic/IconButton/IconButton.stories.tsx index 1e379c43..f691d7f8 100644 --- a/src/components/basic/IconButton/IconButton.stories.tsx +++ b/src/components/basic/IconButton/IconButton.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { IconButton as Component } from '.' import AddIcon from '@mui/icons-material/Add' @@ -35,9 +35,9 @@ export default { }, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const IconButton = Template.bind({}) IconButton.args = { diff --git a/src/components/basic/Image/Image.stories.tsx b/src/components/basic/Image/Image.stories.tsx index c61874dd..d8c4f20f 100644 --- a/src/components/basic/Image/Image.stories.tsx +++ b/src/components/basic/Image/Image.stories.tsx @@ -84,10 +84,10 @@ const drawing = ((): string => { ctx.lineWidth = 2 ctx.beginPath() for (let a = 0; a < 360; a++) { - let p = (Math.PI * a) / 180, - r = h2 * (0.5 + 0.25 * Math.cos(5 * p)), - x = r * Math.cos(p), - y = r * Math.sin(p) + const p = (Math.PI * a) / 180 + const r = h2 * (0.5 + 0.25 * Math.cos(5 * p)) + const x = r * Math.cos(p) + const y = r * Math.sin(p) ctx.lineTo(x + w2, y + h2) } ctx.stroke() diff --git a/src/components/basic/ImageGallery/ImageGallery.stories.tsx b/src/components/basic/ImageGallery/ImageGallery.stories.tsx index 5c9f31dd..5fb8e6e5 100644 --- a/src/components/basic/ImageGallery/ImageGallery.stories.tsx +++ b/src/components/basic/ImageGallery/ImageGallery.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { ImageGallery as Component } from '.' @@ -28,9 +28,9 @@ export default { tags: ['autodocs'], } -const Template: ComponentStory = (args) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const GridMediumSquareGallery = Template.bind({}) GridMediumSquareGallery.args = { diff --git a/src/components/basic/ImageGallery/ImageGalleryItem.stories.tsx b/src/components/basic/ImageGallery/ImageGalleryItem.stories.tsx index 2edf1491..0d0fdc6b 100644 --- a/src/components/basic/ImageGallery/ImageGalleryItem.stories.tsx +++ b/src/components/basic/ImageGallery/ImageGalleryItem.stories.tsx @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { ImageItem } from './ImageItem' export default { @@ -25,9 +25,9 @@ export default { component: ImageItem, } -const Template: ComponentStory = (args) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const ImageGalleryItem = Template.bind({}) ImageGalleryItem.args = { diff --git a/src/components/basic/Input/Input.stories.tsx b/src/components/basic/Input/Input.stories.tsx index 1ca7e3db..40957719 100644 --- a/src/components/basic/Input/Input.stories.tsx +++ b/src/components/basic/Input/Input.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Input as Component } from '.' @@ -33,9 +33,9 @@ export default { }, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const Input = Template.bind({}) Input.args = { diff --git a/src/components/basic/LanguageSwitch/LanguageSwitch.stories.tsx b/src/components/basic/LanguageSwitch/LanguageSwitch.stories.tsx index 10d35060..0d05d02a 100644 --- a/src/components/basic/LanguageSwitch/LanguageSwitch.stories.tsx +++ b/src/components/basic/LanguageSwitch/LanguageSwitch.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { LanguageSwitch as Component } from '.' @@ -33,9 +33,9 @@ export default { }, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const LanguageSwitch = Template.bind({}) LanguageSwitch.args = { diff --git a/src/components/basic/LoadingButton/LoadingButton.stories.tsx b/src/components/basic/LoadingButton/LoadingButton.stories.tsx index aeeb7e4c..003f0273 100644 --- a/src/components/basic/LoadingButton/LoadingButton.stories.tsx +++ b/src/components/basic/LoadingButton/LoadingButton.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { LoadingButton as Component } from '.' @@ -29,9 +29,9 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const LoadingButton = Template.bind({}) LoadingButton.args = { diff --git a/src/components/basic/Logo/Logo.stories.tsx b/src/components/basic/Logo/Logo.stories.tsx index 970cb582..35bacb35 100644 --- a/src/components/basic/Logo/Logo.stories.tsx +++ b/src/components/basic/Logo/Logo.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Logo as Component } from '.' @@ -28,9 +28,9 @@ export default { tags: ['autodocs'], } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const Logo = Template.bind({}) Logo.args = { diff --git a/src/components/basic/MainNavigation/MainNavigation.stories.tsx b/src/components/basic/MainNavigation/MainNavigation.stories.tsx index d8c9de1a..ffa7a9a2 100644 --- a/src/components/basic/MainNavigation/MainNavigation.stories.tsx +++ b/src/components/basic/MainNavigation/MainNavigation.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Box } from '@mui/material' import CXLogoText from '../../../assets/logo/cx-logo-text.svg' @@ -41,7 +41,9 @@ const items = [ { href: '/partnernetwork', title: 'Partner Network' }, ] -const Template: ComponentStory = (args: any) => ( +const Template: ComponentStory = ( + args: React.ComponentProps +) => ( = (args: any) => ( export const MainNavigation = Template.bind({}) MainNavigation.args = { - items: items, + items, } diff --git a/src/components/basic/Menu/Menu.stories.tsx b/src/components/basic/Menu/Menu.stories.tsx index 75a55f5b..e67b39f2 100644 --- a/src/components/basic/Menu/Menu.stories.tsx +++ b/src/components/basic/Menu/Menu.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Menu as Component } from '.' @@ -28,9 +28,9 @@ export default { tags: ['autodocs'], } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const Menu = Template.bind({}) Menu.args = { diff --git a/src/components/basic/MultiSelectList/MultiSelectList.stories.tsx b/src/components/basic/MultiSelectList/MultiSelectList.stories.tsx index 8657cc96..5e89cf3b 100644 --- a/src/components/basic/MultiSelectList/MultiSelectList.stories.tsx +++ b/src/components/basic/MultiSelectList/MultiSelectList.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { MultiSelectList as Component } from '.' @@ -29,7 +29,7 @@ export default { argTypes: {}, } -const items: any[] = [ +const items = [ { id: 1, title: 'Dismantler App', @@ -77,13 +77,13 @@ const items: any[] = [ }, ] -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const MultiSelectList = Template.bind({}) MultiSelectList.args = { - items: items, + items, label: 'Label Name', placeholder: 'Enter label name (type min 2 character)', helperText: 'Helper', @@ -99,6 +99,8 @@ MultiSelectList.args = { notItemsText: 'not items selected', keyTitle: 'title', tagSize: 'medium', - onAddItem: (item: any) => console.log('items:', item), + onAddItem: (item) => { + console.log('items:', item) + }, filterOptionsArgs: {}, } diff --git a/src/components/basic/NewSubNavigation/NewSubNavigation.stories.tsx b/src/components/basic/NewSubNavigation/NewSubNavigation.stories.tsx index cf6c1d39..f973f0d7 100644 --- a/src/components/basic/NewSubNavigation/NewSubNavigation.stories.tsx +++ b/src/components/basic/NewSubNavigation/NewSubNavigation.stories.tsx @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { NewSubNavigation as Component } from '.' export default { @@ -27,9 +27,9 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const NewSubNavigation = Template.bind({}) NewSubNavigation.args = { @@ -79,12 +79,18 @@ NewSubNavigation.args = { buttonArray: [ { buttonLabel: 'Button1', - onButtonClick: () => console.log('Button1'), + onButtonClick: () => { + console.log('Button1') + }, }, { buttonLabel: 'Button1', - onButtonClick: () => console.log('Button1'), + onButtonClick: () => { + console.log('Button1') + }, }, ], - onClick: () => console.log('on navigation link click'), + onClick: () => { + console.log('on navigation link click') + }, } diff --git a/src/components/basic/Notifications/PageNotification/PageNotification.stories.tsx b/src/components/basic/Notifications/PageNotification/PageNotification.stories.tsx index a339ac58..a8eb7878 100644 --- a/src/components/basic/Notifications/PageNotification/PageNotification.stories.tsx +++ b/src/components/basic/Notifications/PageNotification/PageNotification.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { PageNotifications as Component } from '.' @@ -28,15 +28,17 @@ export default { tags: ['autodocs'], argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - {args.children} -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => {args.children} export const PageNotifications = Template.bind({}) PageNotifications.args = { severity: 'success', open: true, - onCloseNotification: () => console.log('close alert'), + onCloseNotification: () => { + console.log('close alert') + }, title: 'Notification title', description: 'This is some notification text and can be replaced later.', contactText: 'Contact', diff --git a/src/components/basic/Notifications/Snackbar/PageSnackbar.stories.tsx b/src/components/basic/Notifications/Snackbar/PageSnackbar.stories.tsx index 6ce8d64c..31a53075 100644 --- a/src/components/basic/Notifications/Snackbar/PageSnackbar.stories.tsx +++ b/src/components/basic/Notifications/Snackbar/PageSnackbar.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { PageSnackbar as Component } from '.' @@ -29,9 +29,9 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const PageSnackbar = Template.bind({}) PageSnackbar.args = { diff --git a/src/components/basic/Notifications/Snackbar/PageSnackbarStack.stories.tsx b/src/components/basic/Notifications/Snackbar/PageSnackbarStack.stories.tsx index c9e40196..d0c1b9f5 100644 --- a/src/components/basic/Notifications/Snackbar/PageSnackbarStack.stories.tsx +++ b/src/components/basic/Notifications/Snackbar/PageSnackbarStack.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { PageSnackbar } from './index' import { PageSnackbarStack as Component } from './PageSnackbarStack' @@ -36,7 +36,9 @@ export default { }, } -const Template: ComponentStory = (args: any) => { +const Template: ComponentStory = ( + args: React.ComponentProps +) => { return ( diff --git a/src/components/basic/OrderStatusButton/OrderStatusButton.stories.tsx b/src/components/basic/OrderStatusButton/OrderStatusButton.stories.tsx index 569d704d..8ec81976 100644 --- a/src/components/basic/OrderStatusButton/OrderStatusButton.stories.tsx +++ b/src/components/basic/OrderStatusButton/OrderStatusButton.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { OrderStatusButton as Component } from '.' @@ -29,9 +29,9 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const OrderStatusButton = Template.bind({}) OrderStatusButton.args = { diff --git a/src/components/basic/ProcessList/ProcessList.stories.tsx b/src/components/basic/ProcessList/ProcessList.stories.tsx index df630b27..1c8555b3 100644 --- a/src/components/basic/ProcessList/ProcessList.stories.tsx +++ b/src/components/basic/ProcessList/ProcessList.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { ProcessList as Component } from '.' @@ -68,9 +68,9 @@ const processListElements = [ }, ] -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const ProcessList = Template.bind({}) ProcessList.args = { diff --git a/src/components/basic/Progress/CircleProgress/CircleProgress.stories.tsx b/src/components/basic/Progress/CircleProgress/CircleProgress.stories.tsx index fb33670e..2a9eebe3 100644 --- a/src/components/basic/Progress/CircleProgress/CircleProgress.stories.tsx +++ b/src/components/basic/Progress/CircleProgress/CircleProgress.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { CircleProgress as Component } from '.' @@ -29,9 +29,9 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const CircleProgress = Template.bind({}) CircleProgress.args = { diff --git a/src/components/basic/Progress/LinearProgress/LinearProgressWithValueLabel.stories.tsx b/src/components/basic/Progress/LinearProgress/LinearProgressWithValueLabel.stories.tsx index 23e471f9..8372f6b0 100644 --- a/src/components/basic/Progress/LinearProgress/LinearProgressWithValueLabel.stories.tsx +++ b/src/components/basic/Progress/LinearProgress/LinearProgressWithValueLabel.stories.tsx @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { LinearProgressWithValueLabel as Component } from './LinearProgressWithValueLabel' import spinner from '../../../../../docs/storybook/spinner.md?raw' @@ -34,9 +34,9 @@ export default { }, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const LinearProgressWithValueLabel = Template.bind({}) LinearProgressWithValueLabel.args = { diff --git a/src/components/basic/QuickLinks/QuickLinks.stories.tsx b/src/components/basic/QuickLinks/QuickLinks.stories.tsx index 617b27d6..d0467c05 100644 --- a/src/components/basic/QuickLinks/QuickLinks.stories.tsx +++ b/src/components/basic/QuickLinks/QuickLinks.stories.tsx @@ -18,6 +18,7 @@ ********************************************************************************/ import React from 'react' +import { type ComponentStory } from '@storybook/react' import { QuickLinks as Component } from './index' export default { @@ -27,7 +28,9 @@ export default { argTypes: {}, } -const Template = (args: any) => +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const QuickLinks = Template.bind({}) QuickLinks.args = { diff --git a/src/components/basic/Radio/Radio.stories.tsx b/src/components/basic/Radio/Radio.stories.tsx index 735fc6da..284f23bd 100644 --- a/src/components/basic/Radio/Radio.stories.tsx +++ b/src/components/basic/Radio/Radio.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Radio as Component } from '.' @@ -33,9 +33,9 @@ export default { }, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const Radio = Template.bind({}) Radio.args = { diff --git a/src/components/basic/Rating/Rating.stories.tsx b/src/components/basic/Rating/Rating.stories.tsx index aefec3cb..766b013f 100644 --- a/src/components/basic/Rating/Rating.stories.tsx +++ b/src/components/basic/Rating/Rating.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Rating as Component } from '.' @@ -28,9 +28,9 @@ export default { tags: ['autodocs'], } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const Rating = Template.bind({}) Rating.args = { diff --git a/src/components/basic/SearchInput/SearchInput.stories.tsx b/src/components/basic/SearchInput/SearchInput.stories.tsx index e40ea85c..08a30188 100644 --- a/src/components/basic/SearchInput/SearchInput.stories.tsx +++ b/src/components/basic/SearchInput/SearchInput.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { SearchInput as Component } from '.' @@ -29,9 +29,9 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const SearchInput = Template.bind({}) SearchInput.args = {} diff --git a/src/components/basic/SelectList/SelectList.stories.tsx b/src/components/basic/SelectList/SelectList.stories.tsx index fa4dc5c8..0c02984b 100644 --- a/src/components/basic/SelectList/SelectList.stories.tsx +++ b/src/components/basic/SelectList/SelectList.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { SelectList as Component } from '.' @@ -62,9 +62,9 @@ const countries = [ }, ] -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const SelectList = Template.bind({}) SelectList.args = { @@ -81,6 +81,8 @@ SelectList.args = { noOptionsText: 'No Options', popperHeight: 0, // 0 = auto size defaultValue: countries[0], - onChangeItem: (item: any) => console.log('selected:', item), + onChangeItem: (item) => { + console.log('selected:', item) + }, keyTitle: 'title', } diff --git a/src/components/basic/SideMenu/SideMenu.stories.tsx b/src/components/basic/SideMenu/SideMenu.stories.tsx index 6e4f37e1..24218ed6 100644 --- a/src/components/basic/SideMenu/SideMenu.stories.tsx +++ b/src/components/basic/SideMenu/SideMenu.stories.tsx @@ -19,7 +19,7 @@ ********************************************************************************/ import { Box } from '@mui/material' -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { SideMenu as Component } from '.' import { DraggableChip } from '../Chip/DraggableChip' @@ -37,9 +37,9 @@ export default { }, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const SideMenu = Template.bind({}) SideMenu.args = { diff --git a/src/components/basic/SortOption/SortOption.stories.tsx b/src/components/basic/SortOption/SortOption.stories.tsx index bdde1510..e62d1e45 100644 --- a/src/components/basic/SortOption/SortOption.stories.tsx +++ b/src/components/basic/SortOption/SortOption.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { SortOption as Component } from '.' export default { @@ -27,7 +27,9 @@ export default { tags: ['autodocs'], } -const Template: ComponentStory = (args: any) => ( +const Template: ComponentStory = ( + args: React.ComponentProps +) => (
= (args) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const Table = Template.bind({}) Table.args = { @@ -54,7 +54,9 @@ Table.args = { icon: true, copyValue: 'test', inputValue: 'row1 col2', - isValid: (value) => console.log('Checking Validation', value), + isValid: (value) => { + console.log('Checking Validation', value) + }, errorMessage: 'Please enter valid value.', }, ], @@ -69,5 +71,7 @@ Table.args = { ], ], }, - handleEdit: () => console.log('CLICKED'), + handleEdit: () => { + console.log('CLICKED') + }, } diff --git a/src/components/basic/Stepper/Stepper.stories.tsx b/src/components/basic/Stepper/Stepper.stories.tsx index 738ea3bb..b9c06947 100644 --- a/src/components/basic/Stepper/Stepper.stories.tsx +++ b/src/components/basic/Stepper/Stepper.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Stepper as Component } from '.' @@ -59,9 +59,9 @@ const stepperElements = [ }, ] -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const Stepper = Template.bind({}) Stepper.args = { diff --git a/src/components/basic/SubNavigation/SubNavigation.stories.tsx b/src/components/basic/SubNavigation/SubNavigation.stories.tsx index 503ef21e..a50e7e52 100644 --- a/src/components/basic/SubNavigation/SubNavigation.stories.tsx +++ b/src/components/basic/SubNavigation/SubNavigation.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { SubNavigation as Component } from '.' export default { @@ -28,16 +28,22 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const SubNavigation = Template.bind({}) SubNavigation.args = { buttonLabel: 'Technical User Management', - onButtonClick: () => console.log('on button click'), + onButtonClick: () => { + console.log('on button click') + }, link1Label: 'Access Management', - onLink1Click: () => console.log('on link1 click'), + onLink1Click: () => { + console.log('on link1 click') + }, link2Label: 'Identity User Management', - onLink2Click: () => console.log('on link2 click'), + onLink2Click: () => { + console.log('on link2 click') + }, } diff --git a/src/components/basic/Table/components/StatusTag/statusTag.stories.tsx b/src/components/basic/Table/components/StatusTag/statusTag.stories.tsx index 7d0374c4..d164e315 100644 --- a/src/components/basic/Table/components/StatusTag/statusTag.stories.tsx +++ b/src/components/basic/Table/components/StatusTag/statusTag.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { StatusTag as Component } from '.' export default { @@ -28,9 +28,9 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const StatusTag = Template.bind({}) StatusTag.args = { diff --git a/src/components/basic/Table/table.stories.tsx b/src/components/basic/Table/table.stories.tsx index 9b9a8c3c..c0488d79 100644 --- a/src/components/basic/Table/table.stories.tsx +++ b/src/components/basic/Table/table.stories.tsx @@ -18,10 +18,10 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Table as Component } from '.' -import { +import type { GridColDef, GridRowsProp, GridRenderCellParams, @@ -66,9 +66,9 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => const basicArgs = { autoHeight: true, @@ -104,13 +104,21 @@ TableToolbar.args = { toolbarVariant: 'premium', toolbar: { buttonLabel: 'Add user', - onButtonClick: () => console.log('on button click'), + onButtonClick: () => { + console.log('on button click') + }, buttonDisabled: true, buttonTooltip: 'Not able to add', secondButtonLabel: 'Add Multiple users', - onSecondButtonClick: () => console.log('on multiple button click'), - onSearch: (value) => console.log(`search: "${value}"`), - onFilter: (selectedFilter) => console.log('filter:', selectedFilter), + onSecondButtonClick: () => { + console.log('on multiple button click') + }, + onSearch: (value) => { + console.log(`search: "${value}"`) + }, + onFilter: (selectedFilter) => { + console.log('filter:', selectedFilter) + }, filter: [ { name: 'role', diff --git a/src/components/basic/Tabs/TabPanel.stories.tsx b/src/components/basic/Tabs/TabPanel.stories.tsx index a77aabcb..860fa496 100644 --- a/src/components/basic/Tabs/TabPanel.stories.tsx +++ b/src/components/basic/Tabs/TabPanel.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { TabPanel as Component } from './TabPanel' export default { @@ -35,9 +35,9 @@ export default { }, } -const Template: ComponentStory = (args: any) => ( - TabPanel Content -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => TabPanel Content export const TabPanel = Template.bind({}) TabPanel.args = { diff --git a/src/components/basic/Tabs/Tabs.stories.tsx b/src/components/basic/Tabs/Tabs.stories.tsx index 254a323c..4d5afe93 100644 --- a/src/components/basic/Tabs/Tabs.stories.tsx +++ b/src/components/basic/Tabs/Tabs.stories.tsx @@ -18,13 +18,13 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import GroupOutlinedIcon from '@mui/icons-material/GroupOutlined' import PersonOutlinedIcon from '@mui/icons-material/PersonOutlined' import React from 'react' import { Box } from '@mui/material' -import { ReactComponent } from '*.svg' +import { type ReactComponent } from '*.svg' import { Tab } from './Tab' import { TabPanel } from './TabPanel' import { Tabs } from './Tabs' @@ -44,7 +44,7 @@ export default { const Template: ComponentStory = () => { const [activeTab, setActiveTab] = React.useState(0) - const handleChange = (event: any, newValue: number) => { + const handleChange = (_: unknown, newValue: number) => { setActiveTab(newValue) } diff --git a/src/components/basic/Textarea/Textarea.stories.tsx b/src/components/basic/Textarea/Textarea.stories.tsx index ca20c9a1..bdd9a382 100644 --- a/src/components/basic/Textarea/Textarea.stories.tsx +++ b/src/components/basic/Textarea/Textarea.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Textarea as Component } from '.' @@ -33,9 +33,9 @@ export default { }, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const Textarea = Template.bind({}) Textarea.args = { diff --git a/src/components/basic/ToolTips/ToolTips.stories.tsx b/src/components/basic/ToolTips/ToolTips.stories.tsx index 093c08e8..07db92d3 100644 --- a/src/components/basic/ToolTips/ToolTips.stories.tsx +++ b/src/components/basic/ToolTips/ToolTips.stories.tsx @@ -19,7 +19,7 @@ ********************************************************************************/ import { Box } from '@mui/material' -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Tooltips as Component } from '.' import { Button } from '../Button' @@ -29,7 +29,9 @@ export default { tags: ['autodocs'], } -const Template: ComponentStory = (args: any) => ( +const Template: ComponentStory = ( + args: React.ComponentProps +) => ( = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => -export const userAvatar = Template.bind({}) -userAvatar.args = { +export const UserAvatar = Template.bind({}) +UserAvatar.args = { notificationCount: 0, isNotificationAlert: false, } diff --git a/src/components/basic/VerticalTabs/VerticalTabs.stories.tsx b/src/components/basic/VerticalTabs/VerticalTabs.stories.tsx index add17312..119604a0 100644 --- a/src/components/basic/VerticalTabs/VerticalTabs.stories.tsx +++ b/src/components/basic/VerticalTabs/VerticalTabs.stories.tsx @@ -18,10 +18,10 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Box, Typography } from '@mui/material' -import { TabPanelType, VerticalTabs as Component } from '.' +import { type TabPanelType, VerticalTabs as Component } from '.' export default { title: 'Tabs', @@ -84,11 +84,11 @@ const items: TabPanelType[] = [ description: User Account, }, ] -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const VerticalTab = Template.bind({}) VerticalTab.args = { - items: items, + items, } diff --git a/src/components/basic/ViewSelector/ViewSelector.stories.tsx b/src/components/basic/ViewSelector/ViewSelector.stories.tsx index 6833f566..9b89bcd4 100644 --- a/src/components/basic/ViewSelector/ViewSelector.stories.tsx +++ b/src/components/basic/ViewSelector/ViewSelector.stories.tsx @@ -18,8 +18,8 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' -import { ViewSelector as Component, view } from '.' +import { type ComponentStory } from '@storybook/react' +import { ViewSelector as Component, type View } from '.' export default { title: 'ViewSelector', @@ -28,11 +28,11 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => -const views: view[] = [ +const views: View[] = [ { buttonText: 'All', buttonValue: '', @@ -51,6 +51,6 @@ const views: view[] = [ export const ViewSelector = Template.bind({}) ViewSelector.args = { - views: views, activeView: 'usecases', + views, } diff --git a/src/components/content/Cards/AboutCard.stories.tsx b/src/components/content/Cards/AboutCard.stories.tsx index 290d9d5a..57745774 100644 --- a/src/components/content/Cards/AboutCard.stories.tsx +++ b/src/components/content/Cards/AboutCard.stories.tsx @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { AboutCard as Component } from './AboutCard' @@ -27,9 +27,9 @@ export default { tags: ['autodocs'], } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const AboutCards = Template.bind({}) AboutCards.args = { diff --git a/src/components/content/Cards/AppCards.stories.tsx b/src/components/content/Cards/AppCards.stories.tsx index 826b3761..d43d8d9b 100644 --- a/src/components/content/Cards/AppCards.stories.tsx +++ b/src/components/content/Cards/AppCards.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Cards as Component } from '.' @@ -29,9 +29,9 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => const item = { title: 'Digital Twin Aspect Debugger', diff --git a/src/components/content/Cards/CardAddService.stories.tsx b/src/components/content/Cards/CardAddService.stories.tsx index 221eebe9..5113ec75 100644 --- a/src/components/content/Cards/CardAddService.stories.tsx +++ b/src/components/content/Cards/CardAddService.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { CardAddService as Component } from './CardAddService' @@ -29,9 +29,9 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const AddServiceCard = Template.bind({}) AddServiceCard.args = { diff --git a/src/components/content/Cards/CardDecision.stories.tsx b/src/components/content/Cards/CardDecision.stories.tsx index c8f4fbd4..27957d4d 100644 --- a/src/components/content/Cards/CardDecision.stories.tsx +++ b/src/components/content/Cards/CardDecision.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { StatusVariants } from './CardChip' import { CardDecision as Component } from './CardDecision' @@ -30,9 +30,9 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => const items = [ { @@ -51,5 +51,5 @@ const items = [ export const CardDecision = Template.bind({}) CardDecision.args = { - items: items, + items, } diff --git a/src/components/content/Cards/CardHorizontal.stories.tsx b/src/components/content/Cards/CardHorizontal.stories.tsx index 7df6ecd5..520505b3 100644 --- a/src/components/content/Cards/CardHorizontal.stories.tsx +++ b/src/components/content/Cards/CardHorizontal.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { StatusVariants } from './CardChip' import { CardHorizontal as Component } from './CardHorizontal' @@ -30,9 +30,9 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const CardHorizontal = Template.bind({}) CardHorizontal.args = { diff --git a/src/components/content/Cards/ContentCard.stories.tsx b/src/components/content/Cards/ContentCard.stories.tsx index 1db3ccce..206f7087 100644 --- a/src/components/content/Cards/ContentCard.stories.tsx +++ b/src/components/content/Cards/ContentCard.stories.tsx @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { ContentCard as Component } from './ContentCard' @@ -28,9 +28,9 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => const item = { title: 'ISO_14001_EMAS_or_national_certification', diff --git a/src/components/content/Cards/MarketplaceCard.stories.tsx b/src/components/content/Cards/MarketplaceCard.stories.tsx index 8d99f501..a63508f1 100644 --- a/src/components/content/Cards/MarketplaceCard.stories.tsx +++ b/src/components/content/Cards/MarketplaceCard.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Cards as Component } from '.' @@ -29,9 +29,9 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => const items = [ { @@ -129,14 +129,14 @@ const inactiveSubmenuOptions = [ export const MarketplaceCard = Template.bind({}) MarketplaceCard.args = { columns: 6, - items: items, variant: 'compact', buttonText: 'Details', imageSize: 'medium', imageShape: 'round', addButtonClicked: false, subMenu: true, - activeSubmenuOptions: activeSubmenuOptions, - inactiveSubmenuOptions: inactiveSubmenuOptions, tooltipText: 'Action is pending', + activeSubmenuOptions, + inactiveSubmenuOptions, + items, } diff --git a/src/components/content/Navigation/Navigation.stories.tsx b/src/components/content/Navigation/Navigation.stories.tsx index b37b0198..845df85d 100644 --- a/src/components/content/Navigation/Navigation.stories.tsx +++ b/src/components/content/Navigation/Navigation.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { Navigation as Component } from '.' @@ -29,9 +29,9 @@ export default { argTypes: {}, } -const Template: ComponentStory = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => const items = [ { diff --git a/src/components/content/UserMenu/UserMenu.stories.tsx b/src/components/content/UserMenu/UserMenu.stories.tsx index 31ddf05b..35cd7900 100644 --- a/src/components/content/UserMenu/UserMenu.stories.tsx +++ b/src/components/content/UserMenu/UserMenu.stories.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ComponentStory } from '@storybook/react' +import { type ComponentStory } from '@storybook/react' import { UserMenu as Component } from '.' import { LanguageSwitch } from '../../basic/LanguageSwitch' @@ -30,7 +30,9 @@ export default { tags: ['autodocs'], } -const Template: ComponentStory = (args: any) => ( +const Template: ComponentStory = ( + args: React.ComponentProps +) => ( = (args: any) => ( - -) +const Template: ComponentStory = ( + args: React.ComponentProps +) => export const UserNav = Template.bind({}) UserNav.args = {