@flive/react-ui-states

4.0.1 • Public • Published

react-ui-states

This React module to use some of the best practises about the different states of an user interface

Install

npm install @flive/react-ui-states

Code example

// success state
<UIStates data={{ name: 'Hello'}} loadingMessage="Loading some stuff" loading={loading} error={error} >
  ({ data }) => {
    <Paragraph>data.name<Paragraph/>
  }
</UIStates>

// loading state
<UIStates loading={true} loadingMessage="Loading some stuff" />

// error state
<UIStates
  error={new Error('some error')}
  errorMessage="Ooops something went wrong!"
/>

// blank state
<UIStates
  data={[]}
  blankMessage="Looks like there is something to see there"
/>

Licence

This project is licensed under a custom license. See the LICENSE file for details.

Readme

Keywords

none

Package Sidebar

Install

npm i @flive/react-ui-states

Weekly Downloads

1

Version

4.0.1

License

SEE LICENSE IN LICENSE

Unpacked Size

56 kB

Total Files

8

Last publish

Collaborators

  • robnriks
  • cgrimal
  • damien-s
  • lbdremy