Demos
FormStatus displaying error status
Failure text
<FormStatus text="Failure text" />
FormStatus displaying info status
Long info nisl tempus hendrerit tortor dapibus nascetur taciti porta risus cursus fusce platea enim curabitur proin nibh ut luctus magnis metus
<FormStatustitle="Hover title"text="Long info nisl tempus hendrerit tortor dapibus nascetur taciti porta risus cursus fusce platea enim curabitur proin nibh ut luctus magnis metus"state="info"/>
A stretched and independent FormStatus
NB: The inner text gets a max-width of 47rem to ensure we do not exceed 70 characters limit per line.
Long info nisl tempus hendrerit tortor dapibus nascetur taciti porta risus cursus fusce platea enim curabitur proin nibh ut luctus magnis metus
<FormStatusstretch={true}text="Long info nisl tempus hendrerit tortor dapibus nascetur taciti porta risus cursus fusce platea enim curabitur proin nibh ut luctus magnis metus"state="warn"/>
FormStatus displaying warn status
Warningmessage. Take notice!
<FormStatus state="warn" variant="outlined">Warningmessage. Take notice!</FormStatus>
FormStatus displaying marketing status
Marketingmessage. What a deal!
<FormStatus state="marketing" variant="outlined">Marketingmessage. What a deal!</FormStatus>
A FormStatus, used by the Input Component
You have to fill in this field
<Inputlabel="Input with status:"status="You have to fill in this field"value="Input value"/>
A FormStatus, with a custom-styled content
My info with a link and more text
const CustomStatus = () => (<>My info <Link href="/">with a link</Link> and more text</>)render(<Inputlabel="Input with custom status:"status={<CustomStatus />}status_state="info"value="Input value"/>)
A FormStatus with plain text/HTML
My HTML
with a link
and more text
const myHTML = `My HTML<a class="dnb-anchor" href="/" target="_blank">with a link</a>and more text`const CustomStatus = () => (<spandangerouslySetInnerHTML={{__html: myHTML,}}/>)render(<FormStatus state="info" size="large" variant="outlined"><CustomStatus /></FormStatus>)
In combination with the Icon component
<Iconicon={InfoIcon}size="medium"title="Some title"inherit_color={false}right/><Iconicon={WarnIcon}size="medium"title="Some title"inherit_color={false}right/><Iconicon={ErrorIcon}size="medium"title="Some title"inherit_color={false}right/><Iconicon={MarketingIcon}size="medium"title="Some title"inherit_color={false}/>