-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* π₯ Removed "experimental" text in ReadMe Not experimental anymore * π₯ Removed in tokens and icons too * π Updated list of components and in progress * π Updated Tokens readme * π Updated Icon readme with more up to date examples * π Updated tokens readme * π Made readme pretty * π Update CHANGELOG for tokens, icons, core-react * π Update version tags Was a typo in Tokens... * π Version Tag tokens
- Loading branch information
Showing
9 changed files
with
100 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,26 @@ | ||
# @equinor/eds-tokens | ||
|
||
NB! This is an early version of the EDS Core React components in Typescript and meant for testing only. | ||
[Design tokens] used in the Equinor Design System (EDS), such as colours, typography, spacings etc⦠| ||
|
||
Design tokens used in Equinor Design System (EDS). | ||
## Installation | ||
|
||
## Documentation | ||
|
||
### Base | ||
```sh | ||
npm install @equinor/eds-tokens | ||
``` | ||
## Usage | ||
|
||
Generic tokens used across EDS, such as colours, typography, spacings etc⦠| ||
```js | ||
import { tokens } from '@equinor/eds-tokens' | ||
``` | ||
|
||
#### Tokens | ||
## Tokens | ||
|
||
- Clickbounds | ||
- Colors | ||
- Elevation | ||
- Shape | ||
- Spacing | ||
- States | ||
- Interaction states | ||
- Typography (`ot`, `woff` or `woff2` font required) | ||
|
||
### Components | ||
|
||
Component specific tokens, such as button, input, table etc. These tokens can be used to implement a component in your own technology if needed whilst upholding consistency with design. | ||
|
||
#### Update december 2019 | ||
|
||
The component tokens already made are still part of this package, but we encourage users to use base tokens for now β it proved to be too time consuming at this stage to create every token first in json and then in React. We might revisit the initial strategy at a later point. | ||
|
||
#### Tokens | ||
|
||
- Button | ||
- Table | ||
|
||
### Usage | ||
|
||
#### Use as ESM Module | ||
|
||
Add `"type":"module"` to your apps `package.json` | ||
|
||
```javascript | ||
import { tokens } from "@equinor/eds-tokens" | ||
``` | ||
|
||
#### Use as CommonJS Module | ||
|
||
CommonJS will have a separate package path | ||
|
||
```javascript | ||
import { tokens } from "@equinor/eds-tokens/commonjs" | ||
``` | ||
|
||
#### React storybook example | ||
|
||
```js | ||
import React from 'react' | ||
import { tokens } from '@equinor/eds-tokens' | ||
import styled from 'styled-components' | ||
|
||
const { h1: h1Tokens } = tokens.typography.heading | ||
|
||
const H1 = styled.h1(h1Tokens) | ||
|
||
export default { | ||
title: 'Tokens|Example', | ||
component: H1, | ||
} | ||
|
||
export const TokensExample = () => ( | ||
<div> | ||
<H1>Some header</H1> | ||
</div> | ||
) | ||
|
||
``` | ||
|
||
[design tokens]: https://css-tricks.com/what-are-design-tokens/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters