import { Story, Canvas, ArgsTable } from '@storybook/addon-docs'; import { ModalOverlay } from './modal-overlay'; # ModalOverlay `ModalOverlay` is a transparent overlay that covers the entire screen. It is used to dim the background when a modal is open. ## Props The `ModalOverlay` accepts all props below as well as all [Box](/docs/components-ui-box--default-story#props) component props ### On Click Use the `onClick` prop to handle clicks on the overlay ```jsx import React, { useState } from 'react'; import { ModalOverlay } from '../../component-library'; const [open, setOpen] = useState(false); const handleOnClick = () => { setOpen(!open); }; ; { open && ; } ```