1.3.0 • Published 9 years ago

zooid-error-state v1.3.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

zooid-error-state

Build Status npm version Code Climate Slack Status

Install

npm install --save zooid-error-state

Props

PropTypeDefaultDescription
buttonTextstringText to display in the primary action (optional)
classNamestringAdditional css classes to merge into the component
descriptionstringText explaining the cause of the error
hrefstringURL for the primary action to link to
onClickfuncCalled when the primary action is clicked (optional)
titlestringTitle of the error

Note

For the button to render, a truthy buttonText value and either an onClick or href value must be specified.

Example

import ErrorState from 'zooid-error-state'

export default class App extends Component {
  render() {
    return (
      <ErrorState
        title="Sample Error"
        description="Something has gone terribly wrong"
        buttonText="Continue"
        onClick={action('onClick')} />
    )
  }
}