How to use the @govuk-react/constants.FONT_WEIGHTS.bold function in @govuk-react/constants

To help you get started, we’ve selected a few @govuk-react/constants 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 govuk-react / govuk-react / components / table / src / atoms / Caption / index.js View on Github external
// https://github.com/alphagov/govuk-frontend/blob/master/src/components/table/_table.scss

import styled from 'styled-components';
import { FONT_WEIGHTS } from '@govuk-react/constants';

const Caption = styled('caption')({
  fontWeight: FONT_WEIGHTS.bold,
  display: 'table-caption',
  textAlign: 'left',
});

export default Caption;
github govuk-react / govuk-react / components / table / src / atoms / Cell / index.js View on Github external
({ numeric, alignRight = numeric, bold }) => ({
    padding: `${SPACING_POINTS[2]}px ${SPACING_POINTS[4]}px ${SPACING_POINTS[2]}px 0`,
    borderBottom: `1px solid ${BORDER_COLOUR}`,
    textAlign: alignRight ? 'right' : 'left',
    fontWeight: bold ? FONT_WEIGHTS.bold : undefined,
    ':last-child': {
      paddingRight: 0,
    },
  }),
  ({ numeric, isHeader }) => (numeric && !isHeader ? typography.font({ tabular: true }) : undefined),