0.0.4 • Published 1 year ago
@kyros-digital/react-component-library v0.0.4
react-component-library
Kyros Digital's React Component Library is a library of components that we use on a regular basis to help ui speed development. These components use Tailwind like much of the rest of our development, but these components are opinionated - they are not intended to be used every time, but utilizing, for example, the library Button may cover 80% of use cases for a button with out needing to retype or copy and paste. These components offer some amount of flexibility in customization, but it is recommended that a component needs to truly reflect a look or functionality that is different from the library component to start from scratch.
Add a component
- Do not use Tailwind UI - per the license agreement - https://tailwindui.com/license
- Create the component
- Include passing unit (and integration) tests for the component
- Add build and type files to whitelist in package.json
Setup in new project
- run
yarn add @kyros-digital/react-component-library
- run
yarn add tailwindcss
andtailwind init
- add
"./node_modules/@kyros-digital/react-component-library/**/*.js"
to tailwind.config.js
const { themeExtensions } = require('@kyros-digital/react-component-library/dist/theme/config')
module.exports = {
content: [
...
"./node_modules/@kyros-digital/react-component-library/**/*.js",
...
],
- import the components as needed to your project.