Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 1.74 KB

ElementDrawer.md

File metadata and controls

41 lines (30 loc) · 1.74 KB

◀️Homepage

Element Drawer

import

  • import M_ElementDrawer from 'src/components/M_Components/M_ElementDrawer/M_ElementDrawer'

Basic

To create a drawer like this, you need to use the open, onClose and element properties (this element is basically a function that returns an HTML).

Alt text

       <M_ElementDrawer **open={openElement}** onClose={closeElement} element={element()} />

Other features

Properties Description Example
open boolean . Opens the drawer open={true}
setOpen set State value. setOpen={setOpen}
toolTipClose Label to show close tooltip toolTipClose={"tooltip"}
onClose function that runs when the drawer closes
element HTML ELEMENT.

Example element code:

              const element = () => {
                   return (
                       <>
                           <div className='titleDrawer'>
                               <h1>Small Example </h1>
                           </div>
                           <fieldset>
                               <legend>Some text</legend>
                               <h1>Hello World</h1>
                           </fieldset>
                       </>
                   )
               }