0.3.0 • Published 8 years ago
see-common-components v0.3.0
common-components
all used in React environment
usage
npm install see-common-components
or yarn add see-common-components
Notify Component
import { newNotification } from 'see-common-components'
const notify = () => newNotification(message, color?='#5CB85C', duration?=2000);
notify();
or
import {notify, notifyFailed} from 'see-common-components'
notify(message, duration?)
ListPagination Component
the required onJumpPage function receive currentPage param
optional props:
- pages: total pages
- color
- selectedColor
- bgColor
- selectedBgColor
import { ListPagination } from 'see-common-components'
const ReactComponent = () =>
<div>
{list or tables}
<ListPagination onJumpPage={(page) => console.log(page)}>
</div>
NotFoundPage
this container components only used in React Router
import { NotFound } from 'see-common-components'
<Switch>
{...}
<Route path='*' component={NotFound} />
</Switch>
`