1.6.1 • Published 1 year ago
@littlespoon/drawer v1.6.1
@littlespoon/drawer
Install
Yarn:
yarn add @littlespoon/drawernpm:
npm install @littlespoon/drawer --saveUsage
Import component:
import Drawer from '@littlespoon/drawer'Render drawer:
<Drawer open>
<h2>Lorem Ipsum</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</Drawer>Render drawer with a close button:
<Drawer open showCloseButton>
<h2>Lorem Ipsum</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</Drawer>Render a styled drawer:
import styled from 'styled-components'
const StyledDrawer = styled(Drawer)`
background-color: #95efc3;
&.styled-drawer {
color: #f10a86;
}
`
;<StyledDrawer className="styled-drawer" open>
<h2>Lorem Ipsum</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</StyledDrawer>