/* eslint-disable react/prop-types */ import 'twin.macro'; import { useArgs } from '@storybook/client-api'; import React from 'react'; import Button from '~/inputs/Button'; import Overlay from '~/layout/Overlay'; export default { title: 'Layout/Overlay', component: Overlay, args: { isOpen: false, offsetTop: 40, }, argTypes: { isOpen: { control: { type: 'boolean', }, }, offsetTop: { control: { type: 'number', }, }, }, }; export function Default(props) { const [_, updateArgs] = useArgs(); const onOpen = () => updateArgs({ ...props, isOpen: true }); const onClose = () => updateArgs({ ...props, isOpen: false }); return ( <>

Use the button below to toggle the overlay

The overlay will cover the entirety of the screen

Overlay Content

Click the button to dismiss the overlay

); }