Micro UI are a ReactJS component library built to be customizable and easy to use which saves a lot of time when starting a new project.
Inside your React project directory, install Micro UI by running either of the following:
# with npm
npm install micro-ui styled-components
# with yarn
yarn add micro-ui styled-components
Please note that react >=16.8.0, react-dom >=16.8.0, styled-components >=5.0.0 and prop-types >=15.0.0 are peer dependencies.
First, you need to set up the styled-components ThemeProvider at the root of your application with the following:
import { ThemeProvider } from 'styled-components'
import { theme } from 'micro-ui'
function App({ children }) {
return <ThemeProvider theme={theme}>{children}</ThemeProvider>
}
Now you can start using your component like this:
import { Button } from 'micro-ui'
function Example() {
return <Button>Click me</Button>
}
- Clone the repository using
git clone
- Run
npm install
oryarn install
- Run
npm run storybook
oryarn storybook
Open http://localhost:6006 to see the storybook
If you want to contribute to this project, you can take a look at CONTRIBUTING.md
To run unit-testing
# Test
npm run test
# or
yarn test
# Watch test
npm run test:watch
# or
yarn test:watch
# Test coverage
npm run test:coverage
# or
yarn test:coverage