1.0.36 • Published 9 months ago

@loja-integrada/admin-components v1.0.36

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Admin-Components

NPM Version

This package contains the admin components for the admin dashboard.

Usage

Installation

Install the package using your package manager:

npm install @loja-integrada/admin-components
yarn add @loja-integrada/admin-components
pnpm add @loja-integrada/admin-components

Configure TailwindCSS and PostCSS

The components are built using TailwindCSS, you need to use the @loja-integrada/tailwindcss-config package to use defaultPreset and compile the CSS. Learn more

Style

Import the CSS file in your project default CSS file (like globals.scss):

@import '@loja-integrada/tailwindcss-config/style.scss';

Import components

You can import the components from the package:

import { Button } from '@loja-integrada/admin-components'

or

import { Button } from '@loja-integrada/admin-components/Button'

Development

Create a new component

1 - Choose a category for the component (like components, forms, indicators, etc).

2 - Create a new folder inside src/[category] with the component name. Example: src/forms/InputCurrency.

3 - Create the component file inside the folder. Example: src/forms/InputCurrency/InputCurrency.tsx.

4 - Create the component story file inside the folder. Example: src/forms/InputCurrency/InputCurrency.stories.tsx.

5 - Create the component test file inside the folder. Example: src/forms/InputCurrency/InputCurrency.test.tsx.

6 - Create the component documentation file inside the folder. Example: src/forms/InputCurrency/InputCurrency.doc.mdx.

7 - Create an index.ts file inside the folder to export the component, and export too in parent folder src/forms/index.ts. Example: export * from './InputCurrency';.

You should have the following structure:

src/
  forms/
    InputCurrency/
      InputCurrency.tsx
      InputCurrency.stories.tsx
      InputCurrency.test.tsx
      InputCurrency.doc.mdx
      index.ts

Obs: If your component only works on the client-side, the component file name should be *.client.tsx. Example: InputCurrency.client.tsx

Preview

To preview the components, use the following commands to run Storybook:

pnpm dev

Test

To run the tests, use the following commands:

pnpm test

To run the tests manually in browser, use the following commands:

pnpm test:visual
1.0.36

9 months ago

1.0.35

10 months ago

0.19.9

10 months ago

0.19.8

10 months ago

1.0.33

10 months ago

1.0.32

10 months ago

1.0.31

10 months ago

1.0.29

10 months ago

1.0.30

10 months ago

1.0.28

11 months ago

1.0.27

11 months ago

1.0.19

12 months ago

1.0.2

1 year ago

1.0.18

12 months ago

1.0.1

1 year ago

1.0.17

12 months ago

1.0.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

0.19.4

1 year ago

0.19.5

1 year ago

0.19.6

1 year ago

0.19.7

12 months ago

1.0.22

12 months ago

1.0.21

12 months ago

1.0.20

12 months ago

1.0.26

11 months ago

1.0.25

11 months ago

1.0.24

11 months ago

1.0.23

11 months ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.15

12 months ago

1.0.14

12 months ago

1.0.13

1 year ago

1.0.12

1 year ago

0.19.3

1 year ago

1.0.0-beta.0

1 year ago

0.19.2

1 year ago

0.19.0

1 year ago

0.19.1

1 year ago

0.18.35

1 year ago

0.18.34

2 years ago

0.18.33

2 years ago

0.18.32

2 years ago

0.18.26

2 years ago

0.18.28

2 years ago

0.18.27

2 years ago

0.18.29

2 years ago

0.18.31

2 years ago

0.18.30

2 years ago

0.18.15

2 years ago

0.18.17

2 years ago

0.18.16

2 years ago

0.18.19

2 years ago

0.18.18

2 years ago

0.18.22

2 years ago

0.18.21

2 years ago

0.18.24

2 years ago

0.18.23

2 years ago

0.18.25

2 years ago

0.18.20

2 years ago

0.18.11

2 years ago

0.18.10

2 years ago

0.18.13

2 years ago

0.18.12

2 years ago

0.18.14

2 years ago

0.18.9

2 years ago

0.18.7

3 years ago

0.18.8

3 years ago

0.18.2

3 years ago

0.18.3

3 years ago

0.18.4

3 years ago

0.18.5

3 years ago

0.18.6

3 years ago

0.18.1

3 years ago

0.17.0

3 years ago

0.18.0

3 years ago

0.15.5

3 years ago

0.16.0

3 years ago

0.16.1

3 years ago

0.16.2

3 years ago

0.15.4

3 years ago

0.15.2

3 years ago

0.15.3

3 years ago

0.12.8

3 years ago

0.13.0

3 years ago

0.14.0

3 years ago

0.13.1

3 years ago

0.15.0

3 years ago

0.14.1

3 years ago

0.15.1

3 years ago

0.12.7

3 years ago

0.12.4

3 years ago

0.12.5

3 years ago

0.12.6

3 years ago

0.9.8

4 years ago

0.9.7

4 years ago

0.9.9

4 years ago

0.9.6

4 years ago

0.10.0

3 years ago

0.11.0

3 years ago

0.12.0

3 years ago

0.12.1

3 years ago

0.12.2

3 years ago

0.12.3

3 years ago

0.9.5

4 years ago

0.9.4

4 years ago

0.9.3

4 years ago

0.9.2

4 years ago

0.9.1

4 years ago

0.9.0

4 years ago

0.8.9

4 years ago

0.8.8

4 years ago

0.8.7

4 years ago