@rapharacing/tokens
v1.7.1
Published
[](https://gitlab.com/rapharacing/rapha-front-end/tokens/commits/master) [};
display: grid;
grid-template-rows: 2fr;
grid-template-columns: repeat(6, 1fr);
grid-column-gap: ${dim(2)};
margin: 0 ${dim(2)};
${mq.md`
grid-template-rows: 1fr;
grid-template-columns: repeat(12, 1fr);
grid-column-gap: ${dim(2)};
margin: 0 ${dim(2)};
`}
`;Basic API methods
tokens.get() - Get a token value
The tokens.get() function can be used to get any value from the design-system. Use object dot notation to find the value you need from your design system object.
tokens.get('type.baseFontSize');API helper methods
The helper methods make getting values much more simple.
tokens.fontSize()ortokens.fs()- Get font-size valuestokens.color()- Get color palette valuestokens.brand()- Get brand palette values
tokens.fontSize()
tokens.fontSize('heading1');tokens.color()
tokens.color('grey1');tokens.brand()
tokens.color('pink');Formats
The main structure of the package is written in Typescript for better usage in Typescript projects.
License
Media query is freely distributable under the terms of the MIT license.
