react-aria modal sidebar

This commit is contained in:
paco
2020-10-08 15:21:21 -06:00
parent d8ff9bc4ff
commit a7778fc5c5
3 changed files with 83 additions and 37 deletions

View File

@@ -15,7 +15,7 @@ interface Props {
const CoreLayout: FC<Props> = ({ className, children }) => {
const rootClassName = cn(s.root, className)
const { displaySidebar } = useUI()
const { displaySidebar, closeSidebar } = useUI()
return (
<div className={rootClassName}>
@@ -28,7 +28,7 @@ const CoreLayout: FC<Props> = ({ className, children }) => {
<main className={s.main}>{children}</main>
</Container>
<Footer />
<Sidebar show={displaySidebar}>
<Sidebar show={displaySidebar} close={closeSidebar}>
<CartSidebarView />
</Sidebar>
</div>