Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('can be inverted', () => {
let paragraph = doShallowStyled()
expect(paragraph).toHaveStyleRule('color', typography.color.color)
expect(paragraph).not.toHaveStyleRule('color', typography.invertedColor.color)
paragraph = doShallowStyled({ invert: true })
expect(paragraph).not.toHaveStyleRule('color', typography.color.color)
expect(paragraph).toHaveStyleRule('color', typography.invertedColor.color)
})
it('can be inverted', () => {
let paragraph = doShallowStyled()
expect(paragraph).toHaveStyleRule('color', typography.color.color)
expect(paragraph).not.toHaveStyleRule('color', typography.invertedColor.color)
paragraph = doShallowStyled({ invert: true })
expect(paragraph).not.toHaveStyleRule('color', typography.color.color)
expect(paragraph).toHaveStyleRule('color', typography.invertedColor.color)
})
const textColor = ({ invert }) => (invert ? typography.invertedColor : typography.color)
const textInheritColor = ({ inheritColor }) => (inheritColor ? { color: 'inherit' } : undefined)
const paragraphColor = ({ invert }) => (invert ? typography.invertedColor : typography.color)
const paragraphInheritColor = ({ inheritColor }) =>