0.8.6 • Published 3 years ago

@grahamdigital/gmg-system v0.8.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

WIP

Radix System

yarn add @modulz/radix-system

Theme-aware responsive style props for building design systems

Built on top of @styled-system/core by Brent Jackson.

Install it

Radix System is currently under development, but if you'd like to use it anyway:

# npm
npm install @modulz/radix-system
# yarn
yarn add @modulz/radix-system

Features

Radix System is an alternative to Styled System, built on the same Core package but with a few tweaks:

  • Typescript support
  • style functions are independent
  • color style function has been renamed to textColor
  • space has been split into margin and space
  • Theme-aware variant API

Use it

Import style functions:

import styled from "styled-components";
import { margin, backgroundColor, compose } from "@modulz/radix-system";

const styleProps = compose(margin, backgroundColor);
const Box = styled("div")(styleProps);

const App = () => (
  <Box my={4} bg="blue">
    Hey there 👋
  </Box>
);

With Typescript:

import styled from "styled-components";
import {
  margin,
  MarginProps,
  backgroundColor,
  BackgroundColorProps,
  compose,
} from "@modulz/radix-system";

const styleProps = compose(margin, backgroundColor);
type BoxProps = MarginProps & BackgroundColorProps;
const Box = styled("div") < BoxProps > styleProps;

const App = () => (
  <Box my={4} bg="blue">
    Hey there 👋
  </Box>
);

Docs

Proper docs coming soon.


License

MIT © Modulz

0.8.6

3 years ago

0.9.0-alpha.1

3 years ago

0.9.0-alpha.2

3 years ago

0.9.0-alpha.3

3 years ago

0.9.0-alpha.0

3 years ago

0.8.5

3 years ago

0.8.4

3 years ago

0.8.3

3 years ago

0.8.2

3 years ago

0.3.0

3 years ago

0.2.1

3 years ago

0.1.2

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.8.1

3 years ago

0.6.3

3 years ago

0.5.4

3 years ago

0.8.0

3 years ago

0.6.2

3 years ago

0.5.3

3 years ago

0.5.0

3 years ago

0.4.0

3 years ago

0.3.1

3 years ago

0.1.3

3 years ago

0.7.0

3 years ago

0.6.1

3 years ago

0.5.2

3 years ago

0.6.0

3 years ago

0.5.1

3 years ago

0.0.6

3 years ago

0.0.4

3 years ago