From 595fcf3aa890187338aebcdfc245441c37ad704b Mon Sep 17 00:00:00 2001 From: inna-i Date: Tue, 1 Aug 2023 17:02:42 +0300 Subject: [PATCH] fix: lint error in story --- .../Elevation/Elevation.stories.tsx | 110 +++++++++--------- 1 file changed, 54 insertions(+), 56 deletions(-) diff --git a/packages/storybook/src/design-system/Elevation/Elevation.stories.tsx b/packages/storybook/src/design-system/Elevation/Elevation.stories.tsx index 59dd1fb652c..70e9ed9c84b 100644 --- a/packages/storybook/src/design-system/Elevation/Elevation.stories.tsx +++ b/packages/storybook/src/design-system/Elevation/Elevation.stories.tsx @@ -10,35 +10,11 @@ import { Popover, Tooltip, } from '@talend/design-system'; -import { ModalPropsType } from '@talend/design-system/lib/components/Modal'; export default { component: Modal, }; -function ModalStory(props: Partial) { - const [modalOpen, setModalOpen] = useState(false); - - return ( - <> - setModalOpen(true)} data-test="open-modal"> - Open Magic drawer - - - {modalOpen && ( - { - action('onClose'); - setModalOpen(false); - }} - {...props} - /> - )} - - ); -} - export const ButtonWithPopover = { render: (props: Story) => ( ( - -

- Harry Potter is a series of seven fantasy novels written by British author J. K. Rowling. -
- The novels chronicle the lives of a young wizard, Harry Potter, and his friends Hermione - Granger -
- and Ron Weasley, all of whom are students at Hogwarts School of Witchcraft and Wizardry. -

- - action('clicked')}>Need help? Just hover - -

- The series was originally published in English by Bloomsbury in the United Kingdom and - Scholastic Press in the United States. A series of many genres, including fantasy, drama, - coming-of-age fiction, and the British school story (which includes elements of mystery, - thriller, adventure, horror, and romance), the world of Harry Potter explores numerous - themes and includes many cultural meanings and references. According to Rowling, the main - theme is death. Other major themes in the series include prejudice, corruption, and madness. - action('clicked')}> - Hover and click - - } - > - Hey I am Popover - -

-
- ), + render: (props: Story) => { + const [modalOpen, setModalOpen] = useState(false); + + return ( + <> + setModalOpen(true)} data-test="open-modal"> + Open Magic drawer + + + {modalOpen && ( + { + action('onClose'); + setModalOpen(false); + }} + {...props} + > +

+ Harry Potter is a series of seven fantasy novels written by British author J. K. + Rowling. +
+ The novels chronicle the lives of a young wizard, Harry Potter, and his friends + Hermione Granger +
+ and Ron Weasley, all of whom are students at Hogwarts School of Witchcraft and + Wizardry. +

+ + action('clicked')}>Need help? Just hover + +

+ The series was originally published in English by Bloomsbury in the United Kingdom and + Scholastic Press in the United States. A series of many genres, including fantasy, + drama, coming-of-age fiction, and the British school story (which includes elements of + mystery, thriller, adventure, horror, and romance), the world of Harry Potter explores + numerous themes and includes many cultural meanings and references. According to + Rowling, the main theme is death. Other major themes in the series include prejudice, + corruption, and madness. + action('clicked')}> + Hover and click + + } + > + Hey I am Popover + +

+
+ )} + + ); + }, };