How to use the @commercetools-uikit/design-system.customProperties.spacingXs 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 / internals / calendar-header / calendar-header.js View on Github external
const CalendarHeader = props => {
  const intl = useIntl();
  // https://codepen.io/mudassir0909/pen/eIHqB

  // we prevent all our defined onClicks inside of the CalendarHeader
  // from blurring our input.
  const onMouseDown = React.useCallback(event => {
    event.preventDefault();
  }, []);
  return (
    <div>
      
        
          }
          /&gt;
        
        </div>
github commercetools / ui-kit / src / components / tooltip / tooltip.styles.js View on Github external
const getOffsetMargin = ({ placement }) => {
  const position = (placement && placement.split('-')[0]) || '';
  switch (position) {
    case 'left':
    case 'right':
      return `0 ${vars.spacingXs}`;
    case 'top':
    case 'bottom':
      return `${vars.spacingXs} 0`;
    default:
      return '';
  }
};
github commercetools / ui-kit / src / components / internals / multiline-input / multiline-input.styles.js View on Github external
const getTextareaStyles = (props, theme) => {
  const baseStyles = [
    getInputStyles(props, theme),
    css`
      padding: ${vars.spacingXs} ${vars.spacingS};
      line-height: ${sizeInputLineHeight};
      flex: auto;
      word-break: break-all;
      white-space: pre-wrap;
      resize: vertical;
    `,
  ];
  return baseStyles;
};
github commercetools / ui-kit / src / components / buttons / flat-button / flat-button.js View on Github external
span {
            color: ${props.isDisabled
              ? overwrittenVars.colorNeutral
              : getTextColor(props.tone, false, overwrittenVars)};
          }

          svg * {
            fill: ${props.isDisabled
              ? overwrittenVars.colorNeutral
              : getTextColor(props.tone, false, overwrittenVars)};
          }

          * + span,
          * + svg {
            margin-left: ${vars.spacingXs};
          }

          ${!props.isDisabled
            ? `
            &:hover,
            &:focus {
              span {
                color: ${getTextColor(props.tone, true, overwrittenVars)};
              }
              svg * {
                fill: ${getTextColor(props.tone, true, overwrittenVars)};
              }
            }`
            : ''}
        `;
      }}
github commercetools / merchant-center-application-kit / packages / application-shell / src / components / quick-access / butler / butler.js View on Github external
{(() =&gt; {
            if (this.state.hasNetworkError)
              return (
                <div>
                  
                </div>
              );

            if (
              this.state.results.length === 0 &amp;&amp;
              this.state.searchText.trim().length &gt; 0
            )
              return (
github commercetools / ui-kit / src / components / internals / calendar-body / calendar-body.styles.js View on Github external
const getCalendarIconContainerStyles = (props, state) => {
  const baseIconStyles = css`
    align-items: center;
    box-sizing: border-box;
    background-color: ${vars.backgroundColorForInput};
    border: 1px solid ${vars.borderColorForInput};
    height: ${vars.sizeHeightInput};
    display: flex;
    padding: ${vars.spacingXs};
    border-top-right-radius: ${vars.borderRadiusForInput};
    border-bottom-right-radius: ${vars.borderRadiusForInput};
    outline: 0;
    transition: color ${vars.transitionStandard},
      border-color ${vars.transitionStandard};
    &:active,
    &:focus {
      border-color: ${vars.borderColorForInputWhenFocused};
    }
  `;
  if (props.isDisabled) {
    return [
      baseIconStyles,
      css`
        cursor: not-allowed;
        background-color: ${vars.backgroundColorForInputWhenDisabled};
github commercetools / ui-kit / src / components / buttons / secondary-button / secondary-button.js View on Github external
isToggled={props.isToggled}
      isDisabled={props.isDisabled}
      css={[
        css`
          display: flex;
          align-items: center;
          padding: 0 ${vars.spacingM};
          height: ${vars.bigButtonHeight};
        `,
      ].concat(containerStyles)}
    &gt;
      
        {Boolean(props.iconLeft) &amp;&amp; (
          <span>
            {React.cloneElement(props.iconLeft, {
              color: getIconColor(props),
            })}
          </span>
        )}
        <span>{props.label}</span>
      
    
  );
};
github commercetools / ui-kit / src / components / inputs / money-input / money-input.styles.js View on Github external
const getHighPrecisionWrapperStyles = ({ isDisabled }) => css`
  position: absolute;
  top: 0;
  right: 0;
  margin-right: ${vars.spacingXs};
  height: 100%;
  display: flex;
  align-items: center;
  cursor: ${isDisabled ? 'not-allowed' : 'default'};
  justify-content: center;
`;
github commercetools / ui-kit / src / components / dropdowns / primary-action-dropdown / primary-action-dropdown.js View on Github external
&gt;
    
      <span>
        {React.cloneElement(props.iconLeft, {
          size: 'big',
          color: props.isDisabled ? 'neutral60' : 'solid',
        })}
      </span>
github commercetools / ui-kit / src / components / spacings / inset / inset.js View on Github external
const getPadding = scale => {
  switch (scale) {
    case 'xs':
      return vars.spacingXs;
    case 's':
      return vars.spacingS;
    case 'm':
      return vars.spacingM;
    case 'l':
      return vars.spacingL;
    case 'xl':
      return vars.spacingXl;
    default:
      return 0;
  }
};

@commercetools-uikit/design-system

Core package of the commercetools design system.

MIT
Latest version published 5 days ago

Package Health Score

87 / 100
Full package analysis