This library provides `classnames` and `classlist` functions designed to work in a SolidJS environment with an `postcss-ts-classnames` plugin. You can get IDE-validation and auto-completion of your CSS classes in ts code.
npm install @inlite/solidjs-typed-classlistclassnames and classlist functions designed to work in a SolidJS environment with an postcss-ts-classnames plugin.
sh
npm install solidjs-typed-classlist
`
Usage
First, generate classnames definitions using the postcss-ts-classnames plugin. Then, re-export the classlist and classnames functions from this package as follows:
`ts
import { classlist, classnames } from 'solidjs-typed-classlist';
const cl = classlist;
const cn = classnames;
`
Example
Here is an example of how to use the cl and cn functions in your SolidJS components:
`ts
import { cl, cn } from './path-to-your-re-exported-functions';
const MyComponent = () => {
return (
Hello, SolidJS!
);
};
``