How to use the @commercetools-uikit/design-system.customProperties.fontSizeDefault function in @commercetools-uikit/design-system

To help you get started, we’ve selected a few @commercetools-uikit/design-system 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 commercetools / ui-kit / src / components / inputs / date-time-input / time-input.js View on Github external
const getInputStyles = () => css`
  width: 100%;
  text-align: center;
  border: 0;
  border-top: 1px solid ${vars.colorNeutral90};
  padding: 10px 0;
  outline: 0;
  font-size: ${vars.fontSizeDefault};
  margin-top: ${vars.spacingS};
  color: ${vars.colorSolid};

  :disabled {
    /* Fixes background color in Firefox */
    background-color: ${vars.colorSurface};
  }
`;
const DateCalendarTimeInput = props => (
github commercetools / ui-kit / src / components / buttons / primary-button / primary-button.styles.js View on Github external
const getButtonStyles = (isDisabled, isActive, tone, size) => {
  const baseStyles = css`
    align-items: center;
    color: ${vars.colorSurface};
    transition: background-color ${vars.transitionLinear80Ms};
    font-size: ${vars.fontSizeDefault};
    ${getSizeStyles(size)}
  `;
  // "disabled" takes precendece over "active"
  if (isDisabled) {
    return [
      baseStyles,
      css`
        &,
        &:active,
        &:hover {
          background-color: ${vars.colorAccent98};
          color: ${vars.colorNeutral60};
          box-shadow: 0 0 0 1px ${vars.colorNeutral} inset;
        }
      `,
    ];
github commercetools / merchant-center-application-kit / visual-testing-app / src / test-utils / spec.tsx View on Github external
/*
    We don't want a change in a component's height resulting in diffs of the
    remaining states below it, so we establish a min-height for each spec to
    prevent that.
  */
  min-height: ${props => `${getContainerHeight(props.size)}px`};
`;

const Label = styled.div`
  font-family: ${customProperties.fontFamilyDefault};
  font-weight: bold;
  box-sizing: border-box;
  background-color: #774caf;
  padding: 5px;
  color: ${customProperties.colorSurface};
  font-size: ${customProperties.fontSizeDefault};
`;

const PropList = styled.div`
  background-color: #894ac3;
  padding: 5px;
  box-sizing: border-box;
  font-size: 8pt;
  font-family: monospace;
  color: ${customProperties.colorSurface};
`;

const PropLabel = styled.span`
  font-weight: bold;
  padding: 0 ${customProperties.spacingXs};
  min-width: 140px;
  display: inline-block;
github commercetools / ui-kit / src / components / buttons / accessible-button / accessible-button.js View on Github external
const propsToOmit = ['onClick'];

const Button = styled.button`
  text-decoration: none;
  border: none;
  background: none;
  box-sizing: border-box;
  display: inline-flex;
  outline: 0;
  padding: 0;
  margin: 0;
  white-space: nowrap;
  cursor: ${props => (props.disabled ? 'not-allowed' : 'pointer')};
  color: inherit;
  font: inherit;
  font-size: ${vars.fontSizeDefault};
  font-family: inherit;

  &:disabled {
    cursor: not-allowed;
  }
`;

const AccessibleButton = React.forwardRef((props, ref) => {
  const { onClick } = props;

  const handleClick = React.useCallback(
    event => {
      if (props.isDisabled) {
        event.preventDefault();
        return false;
      }
github commercetools / ui-kit / src / components / internals / calendar-body / calendar-body.styles.js View on Github external
const getInputContainerStyles = () => css`
  width: 100%;
  align-items: center;
  display: flex;
  font-size: ${vars.fontSizeDefault};
  font-family: inherit;
`;
github commercetools / ui-kit / src / components / stamp / stamp.js View on Github external
const Label = props => (
  <div>
    {props.children}
  </div>
);
github commercetools / ui-kit / src / components / buttons / secondary-button / secondary-button.js View on Github external
const asProps = shouldUseLinkTag ? { as: Link } : { as: props.as };

  const buttonAttributes = {
    'data-track-component': 'SecondaryButton',
    ...filterInvalidAttributes(props),
    ...(shouldUseLinkTag ? { to: props.linkTo } : {}),
  };

  const containerStyles = [
    css`
      display: inline-flex;
      background-color: ${vars.colorSurface};
      border-radius: ${vars.borderRadius6};
      box-shadow: ${vars.shadow7};
      color: ${vars.colorSolid};
      font-size: ${vars.fontSizeDefault};
      transition: background-color ${vars.transitionLinear80Ms},
        box-shadow ${vars.transitionEaseinout150Ms};
    `,
    getStateStyles(props.isDisabled, isActive, props.theme),
    getThemeStyles(props.theme),
  ];

  return (
github commercetools / ui-kit / src / components / panels / collapsible-panel / collapsible-panel.styles.js View on Github external
const getContainerStyles = ({ isCondensed, theme }) => {
  const baseStyles = css`
    font-family: inherit;
    box-shadow: ${vars.shadow1};
    color: ${vars.colorSolid};
    border-radius: ${vars.borderRadius6};
    position: relative;
    min-width: 550px;
    font-size: ${vars.fontSizeDefault};
    padding: 0;
    background-color: ${theme === 'light'
      ? vars.colorSurface
      : vars.colorNeutral95};
  `;

  if (isCondensed) {
    return [
      baseStyles,
      css`
        min-width: 0;
      `,
    ];
  }
  return baseStyles;
};

@commercetools-uikit/design-system

Core package of the commercetools design system.

MIT
Latest version published 10 days ago

Package Health Score

90 / 100
Full package analysis