0.0.26 • Published 2 months ago

osom-ui v0.0.26

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

osom-ui

NPM Version GitHub

Background

I'm using daisyUI, but I'm having some issues. daisyUI completes components with a combination of CSS classes. (e.g. btn btn-sm btn-ghost) However, if you use the @apply directive in a css module, the class name will disappear. Therefore, the class name must be exposed to HTML.

I advocate splitting HTML/JS/CSS as much as possible from a software architecture perspective. Therefore, we want to create a tailwind component that can be used in CSS modules.

Project rule

  • Do not use class selectors like .classA > .classB.
  • This causes problems when using the @apply directive in CSS modules.
  • It is assumed that the @apply directive is actively used in CSS modules.
  • If possible, use selectors that use basic HTML attributes.
  • If there is no appropriate HTML attribute, use the data-* attribute.

Usage

Install package

npm install osom-ui

Apply the plugin to the tailwind.config.js file

module.exports = {
  plugins: [require('osom-ui')],
};

Please refer to the documentation for additional information.

Scripts

## Setup Yarn v2 (Berry)
./yarn set version berry

## Compiles and minifies for production
./yarn build:tailwind

## Style check
./yarn style

## Lints and fixes files
./yarn lint

## Run your unit tests
yarn test

License

See the LICENSE file for details. In summary, osom-ui is licensed under the MIT license.

0.0.24

2 months ago

0.0.25

2 months ago

0.0.26

2 months ago

0.0.22

2 months ago

0.0.23

2 months ago

0.0.20

3 months ago

0.0.21

3 months ago

0.0.19

4 months ago

0.0.18

7 months ago

0.0.17

9 months ago

0.0.16

9 months ago

0.0.15

9 months ago

0.0.14

9 months ago

0.0.12

10 months ago

0.0.11

10 months ago

0.0.10

10 months ago