apeman-react-toast

apeman react package for toast components.

Usage no npm install needed!

<script type="module">
  import apemanReactToast from 'https://cdn.skypack.dev/apeman-react-toast';
</script>

README

apeman-react-toast

Build Status Code Climate Code Coverage npm Version JS Standard

apeman react package for toast components.

Installation

$ npm install apeman-react-toast --save

Demo

Live demo is hosted on GitHub Pages.

Demo Image

Usage

'use strict'

import React from 'react'
import {ApToast, ApToastStyle} from 'apeman-react-toast'

const ExampleComponent = React.createClass({
  render () {
    return (
      <div>
        <ApToastStyle />
        <ApToast/>
      </div>
    )
  }
})

Components

ApErrorToast

Props

Name Type Default Description
messages []
icon 'fa fa-check-circle'
dismiss null
level 'error'

ApInfoToast

Props

Name Type Default Description
messages []
icon 'fa fa-exclamation-circle'
dismiss null
level 'info'

ApToastGroup

Props

Name Type Default Description
default arrayOf
info arrayOf []
error arrayOf []
warn arrayOf []
dismiss func

ApToastItem

Props

Name Type Default Description
text string
icon string

ApToastStyle

Props

Name Type Default Description
style object {}
normalColor string ApStyle.NORMAL_COLOR
infoColor string ApStyle.INFO_COLOR
warnColor string ApStyle.WARN_COLOR
errorColor string ApStyle.ERROR_COLOR
transitionDuration 100

ApToast

Props

Name Type Default Description
messages arrayOf []
icon string null
dismiss func null
level string 'default'
transitionTimeout 100

ApWarnToast

Props

Name Type Default Description
messages []
icon 'fa fa-warning'
dismiss null
level 'warn'

License

This software is released under the MIT License.

Links