diff --git a/packages/storybook/src/design-system/Elevation/Elevation.stories.mdx b/packages/storybook/src/design-system/Elevation/Elevation.stories.mdx index 25441a5df99..f41dc6e5c03 100644 --- a/packages/storybook/src/design-system/Elevation/Elevation.stories.mdx +++ b/packages/storybook/src/design-system/Elevation/Elevation.stories.mdx @@ -13,26 +13,46 @@ import * as Stories from './Elevation.stories'; }} /> -# Elevation for different components combination +# Combinations of Elevation of various components -Different component overlay +Different components overlay ## Zoning + + +## Style + + + ### Variations -**Modal with info in Popover** +**Button with Popover** + + + + + +**Button with Tooltip** - + -## States +**Modal with Tooltip and Popover** + + + + ## Interactions -## Content +N/A ## Usage +N/A + ## Accessibility + +N/A diff --git a/packages/storybook/src/design-system/Elevation/Elevation.stories.tsx b/packages/storybook/src/design-system/Elevation/Elevation.stories.tsx index 9708e39bb94..5b7f57789e8 100644 --- a/packages/storybook/src/design-system/Elevation/Elevation.stories.tsx +++ b/packages/storybook/src/design-system/Elevation/Elevation.stories.tsx @@ -1,8 +1,15 @@ -import { Story, ComponentStory } from '@storybook/react'; +import { Story } from '@storybook/react'; import { useState } from 'react'; import { action } from '@storybook/addon-actions'; -import { Popover, ButtonIcon, ButtonPrimary, Modal } from '@talend/design-system'; +import { + ButtonIconFloating, + ButtonPrimary, + ButtonTertiary, + Modal, + Popover, + Tooltip, +} from '@talend/design-system'; import { ModalPropsType } from '@talend/design-system/lib/components/Modal'; export default { @@ -15,7 +22,7 @@ function ModalStory(props: Partial) { return ( <> setModalOpen(true)} data-test="open-modal"> - See + Open Magic drawer {modalOpen && ( @@ -32,18 +39,64 @@ function ModalStory(props: Partial) { ); } -export const DialogWithTooltipAndPopover: ComponentStory = props => ( - +export const ButtonWithPopover = { + render: (props: Story) => ( action('click')}> - Hey I am tooltip. Click to see the Popover - + action('clicked')} data-test="help-action"> + Need help? + } > - Hey I am Popover + Spell "Patronus!" - Default story child - -); + ), +}; + +export const ButtonWithTooltip = { + render: (props: Story) => ( + + action('clicked')}>Accio! + + ), +}; + +export const DialogWithTooltipAndPopover = { + 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 + +

+
+ ), +};