0.2.2 • Published 3 years ago
junkyard-base v0.2.2
or
yarn add junkyard-uiimport { AppShell, useDrawerContext } from 'junkyard-ui'<AppShell config={config}>{/* Your app code goes here */}</AppShell>const {
state: { anchor, content, isOpen, width, backdropClickClose },
actions: {
openDrawer,
closeDrawer,
setWidth,
setContent,
setAnchor,
setBackdropClickClose,
},
} = useDrawerContext()import { Button } from '@mui/material'
import { AppShell, useDrawerContext } from 'junkyard-ui'
function MyComponent() {
const {
actions: { openDrawer },
} = useDrawerContext()
return (
<Button onClick={() => openDrawer(<div>Hello, World!</div>)}>
Open Drawer
</Button>
)
}
function MyApp() {
return (
<AppShell
config={
{
/* your drawer config here */
}
}
>
<MyComponent />
</AppShell>
)
}0.2.2
3 years ago
0.2.1
3 years ago
0.2.0
3 years ago
0.1.16
3 years ago
0.1.15
3 years ago
0.1.14
3 years ago
0.1.13
3 years ago
0.1.12
3 years ago
0.1.11
3 years ago
0.1.10
3 years ago
0.1.9
3 years ago
0.1.8
3 years ago
0.1.7
3 years ago
0.1.6
3 years ago
0.1.5
3 years ago
0.1.4
3 years ago
0.1.3
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago
1.1.0
3 years ago
1.0.22
3 years ago
1.0.21
3 years ago
1.0.20
3 years ago
1.0.19
3 years ago
1.0.18
3 years ago
1.0.17
3 years ago
1.0.16
3 years ago
1.0.15
3 years ago
1.0.14
3 years ago
1.0.13
3 years ago
1.0.12
3 years ago
1.0.11
3 years ago
1.0.10
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago
1.1.1
3 years ago