How to use @tds/shared-typography - 10 common examples

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 / Text / __tests__ / Text.spec.jsx View on Github external
it('can be inverted', () => {
      let text = doShallowStyled()
      expect(text).not.toHaveStyleRule('color', typography.invertedColor.color)

      text = doShallowStyled({ invert: true })
      expect(text).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 / 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 / __tests__ / Text.spec.jsx View on Github external
it('can be inverted', () => {
      let text = doShallowStyled()
      expect(text).not.toHaveStyleRule('color', typography.invertedColor.color)

      text = doShallowStyled({ invert: true })
      expect(text).toHaveStyleRule('color', typography.invertedColor.color)
    })
github telus / tds-core / packages / Text / __tests__ / Text.spec.jsx View on Github external
it('can be bold', () => {
      let text = doShallowStyled({ bold: false })
      expect(text).not.toHaveStyleRule('font-weight', typography.boldFont.fontWeight.toString())

      text = doShallowStyled({ bold: true })
      expect(text).toHaveStyleRule('font-weight', typography.boldFont.fontWeight.toString())
    })
github telus / tds-core / packages / Text / __tests__ / Text.spec.jsx View on Github external
it('can be bold', () => {
      let text = doShallowStyled({ bold: false })
      expect(text).not.toHaveStyleRule('font-weight', typography.boldFont.fontWeight.toString())

      text = doShallowStyled({ bold: true })
      expect(text).toHaveStyleRule('font-weight', typography.boldFont.fontWeight.toString())
    })
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 / __tests__ / Text.spec.jsx View on Github external
it('renders a span with display: block if specified', () => {
      let text = doShallowStyled()
      expect(text).not.toHaveStyleRule('display', typography.blockText.display)

      text = doShallowStyled({ block: true })
      expect(text).toHaveStyleRule('display', typography.blockText.display)
    })
github telus / tds-core / packages / Text / __tests__ / Text.spec.jsx View on Github external
it('renders a span with display: block if specified', () => {
      let text = doShallowStyled()
      expect(text).not.toHaveStyleRule('display', typography.blockText.display)

      text = doShallowStyled({ block: true })
      expect(text).toHaveStyleRule('display', typography.blockText.display)
    })