diff --git a/packages/storybook/src/design-system/Elevation/Elevation.stories.mdx b/packages/storybook/src/design-system/Elevation/Elevation.stories.mdx new file mode 100644 index 00000000000..8e05df8b839 --- /dev/null +++ b/packages/storybook/src/design-system/Elevation/Elevation.stories.mdx @@ -0,0 +1,55 @@ +import { Meta, Story } from '@storybook/addon-docs'; +import { FigmaImage, FigmaLink, Use } from '~docs'; + +import * as Stories from './Elevation.stories'; + + + +# Combinations of elevation of various components + +Different components overlay + +## Zoning + + + +## Style + + + +### Variations + +**Button with a Popover** + + + + + +**Button with a Tooltip** + + + + + +**Modal with a Tooltip and Popover** + + + + + +## Interactions + +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 new file mode 100644 index 00000000000..b6fba2c1c1f --- /dev/null +++ b/packages/storybook/src/design-system/Elevation/Elevation.stories.tsx @@ -0,0 +1,99 @@ +import { Story } from '@storybook/react'; +import { useState } from 'react'; +import { action } from '@storybook/addon-actions'; + +import { + ButtonIcon, + ButtonPrimary, + ButtonTertiary, + Modal, + Popover, + Tooltip, +} from '@talend/design-system'; + +export default { + component: Modal, +}; + +export const ButtonWithPopover = { + render: (props: Story) => ( + action('clicked')} data-test="help-action"> + Need help? + + } + > + Spell "Patronus!" + + ), +}; + +export const ButtonWithTooltip = { + render: (props: Story) => ( + + action('clicked')}>Accio! + + ), +}; + +const ModalWithButtons = () => { + const [modalOpen, setModalOpen] = useState(false); + + return ( + <> + setModalOpen(true)} data-test="open-modal"> + Open Magic drawer + + + {modalOpen && ( + { + action('onClose'); + setModalOpen(false); + }} + > +

+ 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 + +

+
+ )} + + ); +}; +export const DialogWithTooltipAndPopover = { + render: () => , +};