How to use the @tds/shared-typography.color function in @tds/shared-typography

To help you get started, we’ve selected a few @tds/shared-typography examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github telus / tds-core / packages / Paragraph / __tests__ / Paragraph.spec.jsx View on Github external
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)
    })
github telus / tds-core / packages / Paragraph / __tests__ / Paragraph.spec.jsx View on Github external
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)
    })
github telus / tds-core / packages / Text / Text.jsx View on Github external
const textColor = ({ invert }) => (invert ? typography.invertedColor : typography.color)
const textInheritColor = ({ inheritColor }) => (inheritColor ? { color: 'inherit' } : undefined)
github telus / tds-core / packages / Paragraph / Paragraph.jsx View on Github external
const paragraphColor = ({ invert }) => (invert ? typography.invertedColor : typography.color)
const paragraphInheritColor = ({ inheritColor }) =>