Components

AlertBar

<AlertBar type heading message done />

Renders the AlertBar component. This component is an alert that dismisses itself.

Constructor

# <AlertBar type heading message done />

PropTypes:
Name Type Required Description Default
type enum Yes The type of AlertBar to display (determines the color). See types.
heading string Yes The heading to display
message string Yes The message to display
done func Yes Tells Redux that this component is no longer needed (i.e. done)
Author:

View Source components/AlertBar/AlertBar.js, line 23

Extends

  • Component

Members

number

# _DISPLAY_TIME_MS

The amount of time that the AlertBar component is displayed (no including transition time). Time is in ms.

View Source components/AlertBar/AlertBar.js, line 37

number

# _TRANSITION_TIME_MS

The amount of time that the AlertBar component takes to transition. Time is in ms. If this constant is changed, be sure to change the equivalent time in the SCSS file for this component.

View Source components/AlertBar/AlertBar.js, line 45

object

# _transitionTimeoutIds

Timeout ids for all of the AlertBar positions/transitions

View Source components/AlertBar/AlertBar.js, line 51

# state

AlertBar component state
Properties:
Name Type Description
transition module:alertBarTransitionOptions The current CSS transition

View Source components/AlertBar/AlertBar.js, line 28

Methods

# clearComponentTimeouts()

Clears all timeouts for AlertBar positions/transitions

View Source components/AlertBar/AlertBar.js, line 99

# closeButttonClickedHandler()

Slides the AlertBar up before the display time has passed

View Source components/AlertBar/AlertBar.js, line 112

# componentDidMount()

Starts AlertBar component timeouts

View Source components/AlertBar/AlertBar.js, line 56

# componentWillUnmount()

Stops asynchronous tasks

View Source components/AlertBar/AlertBar.js, line 63

# createComponentTimeouts()

Creates timeouts for AlertBar positions/transitions

View Source components/AlertBar/AlertBar.js, line 71

# getBackgroundColorStyle() → {string}

Gets the CSS background color class name

View Source components/AlertBar/AlertBar.js, line 136

The background color class name
string

# getTransitionStyle() → {string}

Gets the CSS current transition class name

View Source components/AlertBar/AlertBar.js, line 154

The transition class name
string

# render()

Renders the AlertBar component

View Source components/AlertBar/AlertBar.js, line 168