0.2.2 • Published 2 years ago
junkyard-base v0.2.2
or
yarn add junkyard-ui
import { 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
2 years ago
0.2.1
2 years ago
0.2.0
2 years ago
0.1.16
2 years ago
0.1.15
2 years ago
0.1.14
2 years ago
0.1.13
2 years ago
0.1.12
2 years ago
0.1.11
2 years ago
0.1.10
2 years ago
0.1.9
2 years ago
0.1.8
2 years ago
0.1.7
2 years ago
0.1.6
2 years ago
0.1.5
2 years ago
0.1.4
2 years ago
0.1.3
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
1.1.0
2 years ago
1.0.22
2 years ago
1.0.21
2 years ago
1.0.20
2 years ago
1.0.19
2 years ago
1.0.18
2 years ago
1.0.17
2 years ago
1.0.16
2 years ago
1.0.15
2 years ago
1.0.14
2 years ago
1.0.13
2 years ago
1.0.12
2 years ago
1.0.11
2 years ago
1.0.10
2 years ago
1.0.9
2 years ago
1.0.8
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago
1.1.1
2 years ago