0.2.2 • Published 10 months 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
10 months ago
0.2.1
10 months ago
0.2.0
10 months ago
0.1.16
10 months ago
0.1.15
10 months ago
0.1.14
10 months ago
0.1.13
10 months ago
0.1.12
10 months ago
0.1.11
10 months ago
0.1.10
10 months ago
0.1.9
10 months ago
0.1.8
10 months ago
0.1.7
10 months ago
0.1.6
10 months ago
0.1.5
10 months ago
0.1.4
10 months ago
0.1.3
10 months ago
0.1.2
10 months ago
0.1.1
10 months ago
1.1.0
10 months ago
1.0.22
10 months ago
1.0.21
10 months ago
1.0.20
10 months ago
1.0.19
10 months ago
1.0.18
10 months ago
1.0.17
10 months ago
1.0.16
10 months ago
1.0.15
10 months ago
1.0.14
10 months ago
1.0.13
10 months ago
1.0.12
11 months ago
1.0.11
11 months ago
1.0.10
11 months ago
1.0.9
11 months ago
1.0.8
11 months ago
1.0.7
11 months ago
1.0.6
11 months ago
1.0.5
11 months ago
1.0.4
11 months ago
1.0.2
11 months ago
1.0.1
11 months ago
1.0.0
11 months ago
1.1.1
11 months ago