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 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())
})
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())
})
const paragraphBold = ({ bold, size }) => (bold ? typography.boldFont : typography[`${size}Font`])
const paragraphAlign = ({ align }) => ({
const textBold = ({ bold, size }) => (bold ? typography.boldFont : typography[`${size}Font`])
const textBlock = ({ block }) => (block ? typography.blockText : undefined)