Skip to content

Commit

Permalink
fix(@chakra-ui/layout): style provider in list with specific error me…
Browse files Browse the repository at this point in the history
…ssage
  • Loading branch information
Patrick-Ullrich committed Nov 22, 2021
1 parent 0f0c764 commit dd62efa
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions packages/layout/src/list.tsx
@@ -1,19 +1,24 @@
import { Icon, IconProps } from "@chakra-ui/icon"
import { createContext, getValidChildren } from "@chakra-ui/react-utils"
import { SystemStyleObject } from "@chakra-ui/styled-system"
import {
chakra,
SystemProps,
forwardRef,
HTMLChakraProps,
omitThemingProps,
SystemProps,
ThemingProps,
useMultiStyleConfig,
StylesProvider,
useStyles,
} from "@chakra-ui/system"
import { __DEV__ } from "@chakra-ui/utils"
import { getValidChildren } from "@chakra-ui/react-utils"
import { Dict, __DEV__ } from "@chakra-ui/utils"
import * as React from "react"

const [StylesProvider, useStyles] = createContext<Dict<SystemStyleObject>>({
name: "StylesContext",
errorMessage:
"useStyles: `styles` is undefined. Seems you forgot to wrap the components in a `<*List />` ",
})

interface ListOptions {
/**
* Short hand prop for `listStyleType`
Expand Down

0 comments on commit dd62efa

Please sign in to comment.