-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9598320
commit a1771e1
Showing
4 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { modalAnatomy as parts } from '@chakra-ui/anatomy' | ||
import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system' | ||
|
||
const { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys) | ||
|
||
const baseStyle = definePartsStyle({ | ||
header: { | ||
px: { base: 4, md: 6 }, | ||
pt: 6, | ||
pb: 0, | ||
fontSize: 'md', | ||
fontWeight: 'normal', | ||
}, | ||
body: { | ||
px: { base: 4, md: 6 }, | ||
py: 6, | ||
}, | ||
footer: { | ||
px: { base: 4, md: 6 }, | ||
py: 4, | ||
display: 'block', | ||
}, | ||
dialog: { | ||
bg: 'bg.surface', | ||
boxShadow: 'lg', | ||
}, | ||
}) | ||
|
||
export default defineMultiStyleConfig({ baseStyle }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { | ||
Box, | ||
Drawer, | ||
DrawerBody, | ||
DrawerContent, | ||
DrawerFooter, | ||
DrawerHeader, | ||
DrawerOverlay, | ||
} from '@chakra-ui/react' | ||
import type { Meta } from '@storybook/react' | ||
|
||
const meta: Meta = { | ||
title: 'Components / Drawer', | ||
} | ||
|
||
export default meta | ||
|
||
export const Basic = () => { | ||
return ( | ||
<Drawer isOpen={true} placement="right" onClose={() => void 0}> | ||
<DrawerOverlay /> | ||
<DrawerContent> | ||
<DrawerHeader bg="red.100"> | ||
<Box bg="red.500">Header</Box> | ||
</DrawerHeader> | ||
<DrawerBody bg="green.100"> | ||
<Box bg="green.500">Body</Box> | ||
</DrawerBody> | ||
<DrawerFooter bg="blue.100"> | ||
<Box bg="blue.500">Footer</Box> | ||
</DrawerFooter> | ||
</DrawerContent> | ||
</Drawer> | ||
) | ||
} |
a1771e1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
chakra-ui-pro-theme – ./
pro-theme-five.vercel.app
pro-theme.chakra-ui.com
chakra-ui-pro-theme-git-main-chakra-ui.vercel.app
chakra-ui-pro-theme-chakra-ui.vercel.app