Compiled React Files

Include the lib/styles.css file in your project once. Check the list of available components here.

import  './path/to/files/lib/styles.css'

To import components, simply use

import { UikButton } from './path/to/files/lib'
...
<UikButton>My Button</UikButton>

You can find necessary files in /root/dist/lib folder. This will import the whole package to your project. If you don't want to include the whole pack, you can import only components that you would like to have.

import  './path/to/files/UikButton/styles.scss'
import Button from './path/to/files/UikButton'
...
<Button>My Button</Button>

Dependencies

If importing whole compiled file, you will have to run this command to install dependencies to your project


yarn add react classnames // if using yarn
npm install react clasnames // if using npm

Errors

When importing file, errors might show up. This is because the compiled file is eslinted (it doesn't have to be since it's compiled). Add these files to your .eslintignore file to be ignored. This doesn't work with create-react-app because CRA is ignoring .eslintignore file. Instead, you should add /* eslint-ignore */ on top of the file.