Prop Types

@xstyled/prop-types exposes a utility to generate prop-types from a system prop utility.

How to get Prop Types?

Import getUtilityPropTypes from @xstyled/prop-types and generates prop-types for a custom utility.

import { compose, space, color } from '@xstyled/system'
import { getUtilityPropTypes } from '@xstyled/prop-types'
const customSystem = compose(
space,
color,
)
const SystemBox = styled.div`
${customSystem}
`
SystemBox.propTypes = getUtilityPropTypes(customSystem)