Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1541 from Riley1101/docs/update_createStyleContex…
Browse files Browse the repository at this point in the history
…t_usage
  • Loading branch information
noobinthisgame authored May 10, 2023
2 parents f372909 + 2c04783 commit 71d44a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/docs/styled-system/component-style.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -431,15 +431,15 @@ used.
import {
createStylesContext,
useMultiStyleConfig,
useStyles,
} from '@chakra-ui/react'

const [ useStyles, StylesProvider ] = createStylesContext('Menu');

function Menu(props) {
const { size, variant, children, ...rest } = props

// 2. Consume the `useMultiStyleConfig` hook
const styles = useMultiStyleConfig('Menu', { size, variant })
const [ StylesProvider ] = createStylesContext('Menu');

return (
<Flex __css={styles.menu} {...rest}>
Expand Down

1 comment on commit 71d44a6

@vercel
Copy link

@vercel vercel bot commented on 71d44a6 May 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.