Alert
Vibrant alert messages used as page banners or within forms
Banner alerts
Deprecated
This component is deprecated. Use AlertBanner instead.
These alerts should be used at the very top of a page.
<p theme="bad"> <p> An Alert! </p> </p>
<p theme="good"> <p> An Alert! </p> </p>
<p theme="warning"> <p> A Warning! </p> </p>
<p theme="info"> <p> An Alert! </p> </p>
In-page alerts
These alerts should be used inside other page elements, e.g. forms.
<x theme="bad"> <p> Your credit card is about to expire. To keep quoting on job requests please <a href="https://example.com/"> update your credit card now </a> . </p> </x>
<x theme="good"> <p> Your credit card is about to expire. To keep quoting on job requests please <a href="https://example.com/"> update your credit card now </a> . </p> </x>
<x theme="warning"> <p> Your credit card is about to expire. To keep quoting on job requests please <a href="https://example.com/"> update your credit card now </a> . </p> </x>
<x theme="info"> <p> Your credit card is about to expire. To keep quoting on job requests please <a href="https://example.com/"> update your credit card now </a> . </p> </x>
Props
BannerAlert
children
Text within the alert
TypeReact.ReactNode
Defaultnull
theme
Defines the style of the alert
Type'good' | 'bad' | 'warning' | 'info'
Default'info'
dataTestId
A selector to hook into the React component for use in automated testing environments.
Typestring
dataTest
deprecatedA selector to hook into the React component for use in automated testing environments.
Note:
Deprecated in favor of the
dataTestId
propTypestring
InPageAlert
children
Text within the alert
TypeReact.ReactNode
Defaultnull
theme
Defines the style of the alert
Type'good' | 'bad' | 'warning' | 'info'
Default'info'
dataTestId
A selector to hook into the React component for use in automated testing environments.
Typestring
dataTest
deprecatedA selector to hook into the React component for use in automated testing environments.
Note:
Deprecated in favor of the
dataTestId
propTypestring