4.3.27 • Published 10 days ago

@strategies/tokens v4.3.27

Weekly downloads
-
License
MIT
Repository
-
Last release
10 days ago

Strategies' Design System Tokens

These are the tokenized descriptors of the design system, written as SCSS.

Installation

yarn add @strategeies/tokens

Change token value

  • The tokens are stored in JSON files located in the src folder.
  • We use Style Dictionary to generate SCSS variable files from these JSON files.
  • One of the advantages of storing tokens in JSON format is that they can be easily integrated into the token function. So that, tokens can be used in js/jsx/ts/tsx files

Update the scss file with latest token values

pnpm run build

Usage

Include the global styles to normalize the styling environment

// In your top-level SCSS file (e.g. App.scss)
@import '~@strategies/tokens';

If you are using vite, please remove the tide ~ in the import statement, like this

// In your top-level SCSS file (e.g. App.scss)
@import '@strategies/tokens';

Using the tokens in css or scss file

@use '~@strategies/tokens/color';
@use '~@strategies/tokens/font';

.YourComponent {
    color: color.$blue;
    font-size: font.$size-small;
}

Using the tokens in js/jsx/ts/tsx file

  • the `token function is for getting the value by passing in a path string
  • to use the token function, please install another package @strategeies/ui
pnpm add --save-dev @strategeies/ui
  • usage example
import { ConfigProvider } from 'antd';
import { token } from '@strategeies/ui';

export const ButtonAntConfig = ({children}) => {
    return (
        <ConfigProvider
            theme={{
                token: {
                    /* token fn here */
                    colorPrimary: token('color.text.danger', '#ff0000'),
                }
        }}>
            {children}
        </ConfigProvider>
    )
}

export default ButtonAntConfig;
4.2.15-alpha.0

3 months ago

4.2.15-alpha.1

3 months ago

4.2.15-alpha.2

3 months ago

4.2.20

2 months ago

4.2.21

2 months ago

4.2.22

2 months ago

4.3.2

2 months ago

4.3.1

2 months ago

4.2.10

3 months ago

4.3.4

2 months ago

4.2.11

3 months ago

4.3.3

2 months ago

4.2.12

3 months ago

4.3.0

2 months ago

4.2.17

2 months ago

4.2.18

2 months ago

4.2.19

2 months ago

4.2.13

3 months ago

4.2.14

3 months ago

4.2.15

2 months ago

4.2.16

2 months ago

4.3.9

2 months ago

4.3.6

2 months ago

4.3.5

2 months ago

4.3.8

2 months ago

4.3.7

2 months ago

4.3.13

2 months ago

4.3.12

2 months ago

4.3.11

2 months ago

4.3.10

2 months ago

4.3.17

1 month ago

4.3.16

1 month ago

4.3.15

1 month ago

4.3.14

2 months ago

4.3.19

1 month ago

4.3.18

1 month ago

4.2.5

3 months ago

4.2.7

3 months ago

4.2.6

3 months ago

4.2.9

3 months ago

4.2.8

3 months ago

4.3.20

1 month ago

4.3.24

1 month ago

4.3.23

1 month ago

4.3.22

1 month ago

4.3.21

1 month ago

4.3.27

10 days ago

4.3.26

10 days ago

4.3.25

11 days ago

4.2.3

3 months ago

4.2.4

3 months ago

4.1.7

4 months ago

4.2.2

3 months ago

4.2.1

4 months ago

4.2.0

4 months ago

4.1.6

4 months ago

4.1.5

4 months ago

4.0.63

4 months ago

4.0.62

4 months ago

4.0.65

4 months ago

4.0.64

4 months ago

4.0.61

4 months ago

4.0.60

4 months ago

4.0.67

4 months ago

4.0.66

4 months ago

4.0.69

4 months ago

4.0.68

4 months ago

4.0.52

6 months ago

4.0.51

6 months ago

4.0.54

5 months ago

4.0.53

5 months ago

4.0.50

6 months ago

4.0.59

4 months ago

4.0.56

5 months ago

4.0.55

5 months ago

4.0.58

4 months ago

4.0.57

4 months ago

4.0.73

4 months ago

4.0.70

4 months ago

4.0.72

4 months ago

4.0.71

4 months ago

4.0.41

7 months ago

4.0.43

7 months ago

4.0.42

7 months ago

4.0.49

6 months ago

4.0.48

6 months ago

4.0.45

6 months ago

4.0.44

7 months ago

4.0.47

6 months ago

4.0.46

6 months ago

4.1.4

4 months ago

4.1.3

4 months ago

4.1.0

4 months ago

4.1.2

4 months ago

4.1.1

4 months ago

4.0.40

8 months ago

4.0.38

8 months ago

4.0.39

8 months ago

4.0.37

8 months ago

4.0.34

9 months ago

4.0.33

9 months ago

4.0.36

8 months ago

4.0.35

9 months ago

4.0.2-alpha.0

10 months ago

4.0.19

9 months ago

4.0.4-alpha.0

10 months ago

4.0.21

9 months ago

4.0.20

9 months ago

4.0.27

9 months ago

4.0.26

9 months ago

4.0.29

9 months ago

4.0.28

9 months ago

4.0.23

9 months ago

4.0.22

9 months ago

4.0.0-alpha.0

11 months ago

4.0.25

9 months ago

4.0.24

9 months ago

3.2.0

12 months ago

3.1.27

1 year ago

3.1.26

1 year ago

4.0.5

10 months ago

4.0.10

10 months ago

4.0.7

10 months ago

4.0.6

10 months ago

4.0.1

10 months ago

4.0.0

10 months ago

4.0.16

10 months ago

4.0.15

10 months ago

4.0.18

10 months ago

4.0.17

10 months ago

4.0.12

10 months ago

4.0.11

10 months ago

4.0.14

10 months ago

4.0.13

10 months ago

4.0.3-alpha.0

10 months ago

4.0.9

10 months ago

4.0.8

10 months ago

4.0.5-alpha.0

10 months ago

4.0.30

9 months ago

4.0.32

9 months ago

4.0.31

9 months ago

3.1.24

1 year ago

3.1.22

1 year ago

3.1.21

1 year ago

3.1.20

1 year ago

3.1.19

1 year ago

3.1.18

1 year ago

3.1.16

1 year ago

3.1.15

1 year ago

3.1.14

1 year ago

3.1.12

1 year ago

3.1.13

1 year ago

3.1.11

1 year ago

3.1.10

1 year ago

3.1.9

1 year ago

3.1.8

1 year ago

3.1.7

1 year ago

3.1.5

1 year ago

3.1.4

1 year ago

3.1.3

1 year ago

3.1.2

1 year ago

3.1.1

1 year ago

3.1.0

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

2.1.1

1 year ago

2.1.0

2 years ago

1.8.0

3 years ago

1.7.0

3 years ago

1.6.0

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.5.0

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.0.2

3 years ago

1.1.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago