Refactor <StatusAlert />

Description

https://github.com/edx/paragon/blob/master/src/StatusAlert

1. The component is technically both controlled AND uncontrolled right now. We should refactor to make this a controlled component (see https://stackoverflow.com/a/42522792 for more details).
2. Uses a deprecated React lifecycle method (i.e., componentWillReceiveProps). Instead, we should use componentDidUpdate (or potentially removed if it's not necessary after switching to a controlled component).
3. The content to show in the status alert should be passed in as children instead of as prop. For example:

4. A common use case for content within StatusAlert is to include an icon. We could add an icon prop to pass in an element to use for an icon (e.g., FontAwesomeIcon).

Steps to Reproduce

None

Current Behavior

None

Expected Behavior

None

Reason for Variance

None

Release Notes

None

User Impact Summary

None

Status

Assignee

Unassigned

Reporter

Adam Stankiewicz

Labels

None

Reach

None

Impact

None

Platform Area

None

Customer

None

Partner Manager

None

URL

None

Contributor Name

None

Groups with Read-Only Access

None

Actual Points

None

Category of Work

None

Platform Map Area (Levels 1 &amp; 2)

None

Platform Map Area (Levels 3 &amp; 4)

None

Priority

Unset
Configure