}
/>
)
}
export const ShortTextAndDismissible = (args: Args) => {
return (
Lorem ipsum} />
)
}
export const ShortTextAndActionLinkAsButton = (args: Args) => {
return (
Lorem ipsum}
/>
)
}
export const ShortTextAndActionAsLink = (args: Args) => {
return (
Lorem ipsum}
action={An action}
isDismissible={false}
/>
)
}
export const ShortTextAndActionAsLinkButStyledAsButton = (args: Args) => {
return (
Lorem ipsum}
action={
An action
}
isDismissible={false}
/>
)
}
export const LongActionButton = (args: Args) => {
return (
Action that has a lot of text
}
/>
)
}
export const LongActionLink = (args: Args) => {
return (
Action that has a lot of text}
/>
)
}
export const CustomIcon = (args: Args) => {
return (
🎉}
/>
)
}
export const MultipleButtons = (args: Args) => {
return (
Lorem ipsum}
action={
<>
>
}
type="info"
isActionBelowContent
isDismissible
/>
)
}
export const OverlayedWithCustomClass = (args: Args) => {
return (
<>
This can be any HTML passed to the component. For example,
paragraphs, headers, code samples,{' '}
links, etc are all supported.
}
className="ol-overlay"
action={
<>
>
}
type="info"
isActionBelowContent
isDismissible
/>
we need filler content, so here are some jokes
Did you hear about the circus fire? It was in tents!
How do you catch a squirrel? Climb a tree and act like a nut!
Did you hear about the guy who invented Lifesavers? They say he made
a mint!
Why couldn't the bicycle stand up by itself? It was two tired.
did one hat say to the other?" "Stay here! I'm going on ahead.
Why did Billy get fired from the banana factory? He kept throwing
away the bent ones.
>
)
}
export const SuccessFlow = (args: Args) => {
console.log('.....render')
fetchMock.post(
'express:/test-success',
{ status: 200 },
{ delay: 250, overwriteRoutes: true }
)
const { isLoading, isSuccess, runAsync } = useAsync()
function handleClick() {
console.log('clicked')
runAsync(postJSON('/test-success')).catch(console.error)
}
const ctaText = isLoading ? 'Processing' : 'Click'
const action = (
)
const startNotification = (
This story shows 2 notifications, and it's up to the parent component
to determine which to show. There's a successful request made after
clicking the action and so the parent component then renders the
success notification.
}
/>
)
const successNotification = (
Now follow this link to go home}
type="success"
content={