0.1.7 • Published 2 years ago

micro-ui-react v0.1.7

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Getting Started

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.

Installation

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.

Usage

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>
}

Setting up development

  • Clone the repository using git clone
  • Run npm install or yarn install
  • Run npm run storybook or yarn 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


Testing

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