How to use the @modulz/radix-system.compose function in @modulz/radix-system

To help you get started, we’ve selected a few @modulz/radix-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 modulz / radix / packages / radix / src / components / Box.tsx View on Github external
JustifySelfProps &
  MarginProps &
  MaxWidthProps &
  MaxHeightProps &
  MinHeightProps &
  MinWidthProps &
  OpacityProps &
  OverflowProps &
  PaddingProps &
  TextAlignProps &
  WidthProps &
  PositionSetProps &
  FlexItemSetProps &
  ComponentProps<'div'> & { as?: any };

const styleProps = compose(
  border,
  boxShadow,
  backgroundColor,
  textColor,
  display,
  height,
  justifySelf,
  margin,
  maxHeight,
  maxWidth,
  minHeight,
  minWidth,
  opacity,
  overflow,
  padding,
  textAlign,
github modulz / radix / packages / radix / src / components / GhostButton.tsx View on Github external
import styled from 'styled-components';
import css from '@styled-system/css';
import { margin, MarginProps, padding, PaddingProps, variant, compose } from '@modulz/radix-system';
import themeGet from '@styled-system/theme-get';

type GhostButtonProps = MarginProps &
  PaddingProps & {
    isActive?: Boolean;
  };

const styleProps = compose(
  margin,
  padding
);

export const GhostButton = styled.button(
  props =>
    css({
      appearance: 'none',
      backgroundColor: 'transparent',
      border: 'none',
      borderRadius: 9999,
      color: 'gray800',
      display: 'inline-flex',
      flexShrink: 0,
      alignItems: 'center',
      fontFamily: 'normal',

@modulz/radix-system

Radix System Library

MIT
Latest version published 5 years ago

Package Health Score

48 / 100
Full package analysis

Similar packages