1.17.20 • Published 3 days ago

@strategies/ui v1.17.20

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

Strategies' Design System UI Components

Installation

pnpm add @strategies/ui

Usage

There are two types of components in the system: interface components and portals.

The interface components specify the child elements to act as portals that you can declaratively pass your content into. Regardless of declaration order, these named portals will place their children inside of the elements specified by the interface component.

Example
import { Modal, Title, Body, Buttons, Button } from '@strategies/ui';

<Modal>
    <Title>My Modal</Title>

    <Body>
        <p>This is the body of my modal</p>
    </Body>

    <Buttons>
        <Button onClick={cancel}>
            Cancel
        </Button>

        <Button onClick={save}>
            Save
        </Button>
    </Buttons>
</Modal>

The interface components that are available are:

Build

pnpm run build

Design 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 @strategies/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;
1.17.20

3 days ago

1.17.19

3 days ago

1.17.18

17 days ago

1.17.17

1 month ago

1.17.16

2 months ago

1.17.15

2 months ago

1.17.14

2 months ago

1.17.13

2 months ago

1.17.12

2 months ago

1.17.11

2 months ago

1.17.10

2 months ago

1.17.9

2 months ago

1.17.8

2 months ago

1.17.7

2 months ago

1.17.6

2 months ago

1.17.5

2 months ago

1.17.4

3 months ago

1.17.2

3 months ago

1.17.3

3 months ago

1.17.1

3 months ago

1.16.4

3 months ago

1.17.0

3 months ago

1.16.3

3 months ago

1.16.2

3 months ago

1.16.1

3 months ago

1.16.0

3 months ago

1.15.4

3 months ago

1.15.3

3 months ago

1.15.5

3 months ago

1.15.2

3 months ago

1.15.1

3 months ago

1.15.0

4 months ago

1.14.1

4 months ago

1.14.0

4 months ago

1.14.2

4 months ago

1.13.8

4 months ago

1.13.5

4 months ago

1.13.4

4 months ago

1.13.2

5 months ago

1.13.3

5 months ago

1.13.1

11 months ago

1.13.0

11 months ago

1.12.1

12 months ago

1.12.0

12 months ago

1.11.0

1 year ago

1.11.4

1 year ago

1.11.3

1 year ago

1.11.2

1 year ago

1.11.1

1 year ago

1.11.5

1 year ago

1.10.0

1 year ago

1.9.0

1 year ago

1.9.2

1 year ago

1.8.1

1 year ago

1.8.0

1 year ago

1.7.0

1 year ago

1.6.3

1 year ago

1.5.4

2 years ago

1.6.2

1 year ago

1.5.3

2 years ago

1.6.1

1 year ago

1.5.2

2 years ago

1.6.0

2 years ago

1.5.1

2 years ago

1.3.3

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.3.2

2 years ago

1.3.0

2 years ago

1.2.11

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.9

2 years ago

1.2.10

2 years ago

1.2.0

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.0.2

2 years ago

1.1.0

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago