import React, { useState } from 'react'; import { StoryFn, Meta } from '@storybook/react-webpack5'; import { Alert, Box, Button, Dialog, DialogContent, DialogTitle, MenuItem, Paper, Select, Tooltip, } from '@mui/material'; import { Container, Title } from './styled'; interface ElevationProps { surface: string; isBase: boolean; } const Elevation = ({ surface, isBase = false }: ElevationProps) => { const [open, setOpen] = useState(false); const handleClose = () => { setOpen((prev: boolean) => !prev); }; const handleClickOpen = () => { setOpen(true); }; if (isBase) { return ( Base Elevation Level 1 Level 2 Paper Dropdown Alert Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. A diam sollicitudin tempor id eu nisl nunc mi. Auctor augue mauris augue neque gravida in fermentum.{' '} Modal & Popper Title area Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. A diam sollicitudin tempor id eu nisl nunc mi. Auctor augue mauris augue neque gravida in fermentum. ); } return ( Title area {' '} ); }; export default { title: 'Foundation/Elevation', component: Elevation, argTypes: { Paper: { table: { defaultValue: { summary: 'Elevation 2' }, }, control: { type: null, }, }, Dropdown: { table: { defaultValue: { summary: 'Elevation 1' }, }, control: { type: null, }, }, DatePicker: { table: { defaultValue: { summary: 'Elevation 2' }, }, control: { type: null, }, }, Alert: { table: { defaultValue: { summary: 'Elevation 2' }, }, control: { type: null, }, }, Dialog: { table: { defaultValue: { summary: 'Elevation 2' }, }, control: { type: null, }, }, Tooltip: { table: { defaultValue: { summary: 'Elevation 1' }, }, control: { type: null, }, }, }, parameters: { docs: { description: { component: `The design system has Elevation 1 and Elevation 2. And components using elevation include Paper, Dropdown, DatePicker, Alert, Dialog, and Tooltip.\nEach component has a default value and if it is necessary to implement a component without elevation, you can add 'elevation0' to the class name.`, }, }, }, } as Meta; const ElevationBase: StoryFn = (args, { globals: { theme } }) => ( ); const ElevationNesed: StoryFn = (args, { globals: { theme } }) => ( ); export const Base = { render: ElevationBase, }; export const Nested = { render: ElevationNesed, };