You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
There is no easy way of styling alert messages. All we have is to use the <blockquote> element to generate generic-looking alerts in MDX docs:
> **NOTE**: Useful information that users should know, even when skimming content.
> **TIP**: Helpful advice for doing things better or more easily.
> **IMPORTANT**: Key information users need to know to achieve their goal.
> **WARNING**: Urgent info that needs immediate user attention to avoid problems.
> **CAUTION**: Advises about risks or negative outcomes of certain actions.
Describe the solution you'd like
It would be nice that Storybook supports GitHub-like alerts out of the box in MDX, e.g. I can do something like this:
> [!NOTE]
> Useful information that users should know, even when skimming content.
> [!TIP]
> Helpful advice for doing things better or more easily.
> [!IMPORTANT]
> Key information users need to know to achieve their goal.
> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.
> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.
Alternatively, create a new DocBlocks component that allows us to inject these into our MDX documentation, e.g.:
import { Alert } from'@storybook/addon-docs';
# Hello world!
<Alerttype="note">
Useful information that users should know, even when skimming content.
</Alert>
<Alerttype="tip">
Helpful advice for doing things better or more easily.
</Alert>
<Alerttype="important">
Key information users need to know to achieve their goal.
</Alert>
<Alerttype="warning">
Urgent info that needs immediate user attention to avoid problems.
</Alert>
<Alerttype="caution">
Advises about risks or negative outcomes of certain actions.
</Alert>
Describe alternatives you've considered
No response
Are you able to assist to bring the feature to reality?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is your feature request related to a problem? Please describe.
There is no easy way of styling alert messages. All we have is to use the
<blockquote>
element to generate generic-looking alerts in MDX docs:Describe the solution you'd like
It would be nice that Storybook supports GitHub-like alerts out of the box in MDX, e.g. I can do something like this:
Alternatively, create a new DocBlocks component that allows us to inject these into our MDX documentation, e.g.:
Describe alternatives you've considered
No response
Are you able to assist to bring the feature to reality?
yes, I can
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions