1.0.36 • Published 11 months ago

@loja-integrada/admin-components v1.0.36

Weekly downloads
-
License
MIT
Repository
github
Last release
11 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

11 months ago

1.0.35

12 months ago

0.19.9

12 months ago

0.19.8

12 months ago

1.0.33

12 months ago

1.0.32

12 months ago

1.0.31

12 months ago

1.0.29

1 year ago

1.0.30

1 year ago

1.0.28

1 year ago

1.0.27

1 year ago

1.0.19

1 year ago

1.0.2

1 year ago

1.0.18

1 year ago

1.0.1

1 year ago

1.0.17

1 year 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

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.15

1 year ago

1.0.14

1 year 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

3 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

4 years ago

0.12.5

4 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

4 years ago

0.11.0

4 years ago

0.12.0

4 years ago

0.12.1

4 years ago

0.12.2

4 years ago

0.12.3

4 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