0.1.4 • Published 3 years ago
simpl-react-lib v0.1.4
simpl-react-lib
Installation
yarn simpl-react-lib
getting the css into Your project
with tailwindcss in your project
add the dist into your purge array in the tailwind.config.js
module.exports = {
...
purge: ['./node_modules/simpl-react-lib/dist/*.js'],
...
}
else just import the css directly
// example/index.tsx
// ... imports
import { ToggleSwitch } from 'simpl-react-lib';
import 'simpl-react-lib/dist/tailwind.css';
const App = () => {
const [isToggled, setIsToggled] = React.useState(false);
return (
<div>
<ToggleSwitch
enabled={isToggled}
onChange={(v: boolean) => setIsToggled(v)}
/>
</div>
);
};