1.1.0 • Published 2 years ago
@anorone/react-ui-kit v1.1.0
React UI-kit
Minimalistic React components library.
Installation & Usage
To install the library run the following command:
$ npm install @anorone/react-ui-kit
Usage:
/* import component styles to your main css file */
@import '@anorone/react-ui-kit/dist/style.css';
// App.js
import { Button, Modal } from '@anorone/react-ui-kit';
Example App
To run the example app that showcases the package components in action you should download the source code first.
// Clone the repo. Run commands:
$ cd <project folder>
$ npm install
$ npm run start
There are a couple more commands available in the package.json
file that you can run in the development mode.
API Reference
Button
<Button color="primary" size="large" rounded onClick={openModal}>
Open
</Button>
children
- type:
React.ReactNode
- required:
true
color:
- type:
'primary' | 'secondary'
size
- type:
'small' | 'medium' | 'large'
disabled
- type:
boolean
rounded
- type:
boolean
onClick
- type:
(e: React.MouseEvent) => void
- required:
true
Modal
<Modal isOpen={isOpen} title="Title">
<p>Content</p>
<Button onClick={closeModal}>Close</Button>
</Modal>
children:
- type:
React.ReactNode
- required:
true
isOpen
- type:
boolean
title
- type:
string