0.8.6 • Published 4 years ago
@grahamdigital/gmg-system v0.8.6
WIP
Radix System
yarn add @modulz/radix-systemTheme-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-systemFeatures
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
colorstyle function has been renamed totextColorspacehas been split intomarginandspace- Theme-aware
variantAPI
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
4 years ago
0.9.0-alpha.1
4 years ago
0.9.0-alpha.2
4 years ago
0.9.0-alpha.3
4 years ago
0.9.0-alpha.0
4 years ago
0.8.5
5 years ago
0.8.4
5 years ago
0.8.3
5 years ago
0.8.2
5 years ago
0.3.0
5 years ago
0.2.1
5 years ago
0.1.2
5 years ago
0.2.0
5 years ago
0.1.1
5 years ago
0.8.1
5 years ago
0.6.3
5 years ago
0.5.4
5 years ago
0.8.0
5 years ago
0.6.2
5 years ago
0.5.3
5 years ago
0.5.0
5 years ago
0.4.0
5 years ago
0.3.1
5 years ago
0.1.3
5 years ago
0.7.0
5 years ago
0.6.1
5 years ago
0.5.2
5 years ago
0.6.0
5 years ago
0.5.1
5 years ago
0.0.6
5 years ago
0.0.4
5 years ago