@littlespoon/drawer
v1.6.1
Published
Little Spoon drawer
Downloads
900
Readme
@littlespoon/drawer
Install
Yarn:
yarn add @littlespoon/drawer
npm:
npm install @littlespoon/drawer --save
Usage
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>