A collection of often used react components
One way to try these components without installing them locally is running the codesandbox payground
The other way by cloning the library and running the storybook locally
https:#github.com/fabrigeas/react-components
cd @fabrigeas/react-components
npm run start
# or (both scripts do the samething)
npm run storybook
npm i @fabrigeas/react-components
import { Button } from '@fabrigeas/react-components';
# params:
# all react button params plus the following:
# outlined: boolean
# buttonType: 'info' | 'success' | 'warning' | 'danger'
<Button onClick={} type='submit'>Hello</Button>
<Button outlined>Hello</Button>
<Button buttonType='success'>Save</Button>
<Button buttonType='info'>Start</Button>
<Button outlined buttonType='success'>Save changes</Button>
import { Input } from '@fabrigeas/react-components';
# params:
# all react input params plus the following
# isValid?: booleam
# {/* <Input value={} onChange={} /> */}
<Input isValid={true} />
<Input isValid={true} validFeedback='Looks fine' />
<Input isValid={true} invalid='This field cannot be left empty' />
import { Icon } from '@fabrigeas/react-components';
# params:
# all span params plus
# icon: 'trash' | 'sort' | 'list' | 'home' | 'next'
<Icon icon='trash' />
<Icon icon='home'/>
<Button>
<Icon icon="sort" />
Sort
</Button>
git clone @fabrigeas/react-components
cd react-components
# make your changes and commit
# create a merge request and assign it to me 'fabrigeas@gmail.com'
# A grunt task has been configured to automatically deploy this package
grunt publish:major # increment the npm major version, then publish to npm and push to git
grunt publish:minor # increment the npm minor version, then publish to npm and push to git
grunt publish:patch # increment the npm patch version, then publish to npm and push to git
grunt publish # equivalent to grunt publish:patch
grunt publish:typo # equivalent to grunt publish:patch