Skip to content

Commit

Permalink
docs: update docs about #form-status usage [CI SKIP]
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Jul 24, 2019
1 parent c3cfec4 commit 524ea39
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,36 @@ class Example extends PureComponent {
{/* @jsx */ `
const CustomStatus = () => (
<>
My info <Link href="/">with a link</Link> and more text
My info
<Link href="/">with a link</Link>
and more text
</>
)
render(
<Input
label="Input with custom content:"
label="Input with custom status:"
status={ <CustomStatus /> }
status_state="info"
value="Input value"
/>
)
`}
</ComponentBox>
<ComponentBox
caption="A form status with plain text/HTML"
useRender
>
{/* @jsx */ `
const myHTML = \`
My HTML
<a class="dnb-anchor" href="/" target="_blank">with a link</a>
and more text
\`
const CustomStatus = () => <span dangerouslySetInnerHTML={{ __html: myHTML }} />
render(
<FormStatus status="info">
<CustomStatus />
</FormStatus>
)
`}
</ComponentBox>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 524ea39

Please sign in to comment.