How to use the grommet/utils/mixins.parseMetricToNum function in grommet

To help you get started, we’ve selected a few grommet 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 atanasster / grommet-nextjs / components / grommet / DropInput / StyledDropInput.js View on Github external
padding-right: ${(props) => {
    const widgetsBox = props.numWidgets *
      (24 + (2 * parseMetricToNum(props.theme.global.edgeSize.small)));

    // eslint-disable-next-line no-mixed-operators
    return widgetsBox + (parseMetricToNum(props.theme.global.spacing) / 2) -
    parseMetricToNum(props.theme.global.input.border.width);
  }}px;
`;
github atanasster / grommet-nextjs / components / grommet / DropInput / StyledDropInput.js View on Github external
padding-right: ${(props) => {
    const widgetsBox = props.numWidgets *
      (24 + (2 * parseMetricToNum(props.theme.global.edgeSize.small)));

    // eslint-disable-next-line no-mixed-operators
    return widgetsBox + (parseMetricToNum(props.theme.global.spacing) / 2) -
    parseMetricToNum(props.theme.global.input.border.width);
  }}px;
`;
github atanasster / grommet-nextjs / components / grommet / DropInput / StyledDropInput.js View on Github external
padding-right: ${(props) => {
    const widgetsBox = props.numWidgets *
      (24 + (2 * parseMetricToNum(props.theme.global.edgeSize.small)));

    // eslint-disable-next-line no-mixed-operators
    return widgetsBox + (parseMetricToNum(props.theme.global.spacing) / 2) -
    parseMetricToNum(props.theme.global.input.border.width);
  }}px;
`;
github atanasster / grommet-nextjs / components / grommet / utils / styles.js View on Github external
line-height: ${props => (
    parseMetricToNum(props.theme.global.lineHeight) / parseMetricToNum(props.theme.global.font.size)
  )};
  ${props => props.theme.global.colors.text &&
github atanasster / grommet-nextjs / components / dx-react-grid-grommet / src / templates / table-header-cell / resizing-control.js View on Github external
${props => props.first && `
    left: ${parseMetricToNum(props.theme.global.edgeSize.xxsmall) - 1}px;
  `}
  ${props => props.second && `
github atanasster / grommet-nextjs / components / grommet / utils / styles.js View on Github external
padding: ${props => (
    (parseMetricToNum(props.theme.global.spacing) / 2) -
    parseMetricToNum(props.theme.global.input.border.width)
  )}px;
  border: ${props => props.theme.global.input.border.width} solid ${props => props.theme.global.input.border.color};
github atanasster / grommet-nextjs / components / dx-react-grid-grommet / src / templates / table-header-cell / resizing-control.js View on Github external
${props => props.second && `
    left: ${parseMetricToNum(props.theme.global.edgeSize.xxsmall) + 1}px;
  `}
  ${props => props.resizing && `
github atanasster / grommet-nextjs / components / grommet / utils / styles.js View on Github external
padding: ${props => (
    (parseMetricToNum(props.theme.global.spacing) / 2) -
    parseMetricToNum(props.theme.global.input.border.width)
  )}px;
  border: ${props => props.theme.global.input.border.width} solid ${props => props.theme.global.input.border.color};
github atanasster / grommet-nextjs / components / grommet / utils / styles.js View on Github external
  font-size: ${props => `${(parseMetricToNum(props.theme.global.font.size) / 16) * 1}em`};
  line-height: ${props => (