File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
packages/ui-components/Common/AlertBox Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 7373 @apply bg-danger-700;
7474 }
7575 }
76+
77+ code {
78+ /* Ignore the styles from `markdown.css` */
79+ all : unset;
80+
81+ @apply font-mono;
82+ }
7683}
Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ import AlertBox from '#ui/Common/AlertBox';
66type Story = StoryObj < typeof AlertBox > ;
77type Meta = MetaObj < typeof AlertBox > ;
88
9+ const withMain = ( args : React . ComponentProps < typeof AlertBox > ) => (
10+ < main >
11+ < AlertBox { ...args } />
12+ </ main >
13+ ) ;
14+
915export const Info : Story = {
1016 args : {
1117 level : 'info' ,
@@ -46,6 +52,23 @@ export const Danger: Story = {
4652 } ,
4753} ;
4854
55+ export const InMarkdown : Story = {
56+ args : {
57+ level : 'danger' ,
58+ title : '0' ,
59+ children : (
60+ < >
61+ In a markdown component, < code > Code renders correctly,</ code > { ' ' }
62+ < a href = "#" >
63+ < code > even when in a link</ code >
64+ </ a >
65+ </ >
66+ ) ,
67+ size : 'default' ,
68+ } ,
69+ render : withMain ,
70+ } ;
71+
4972export const WithIcon : Story = {
5073 args : {
5174 level : 'info' ,
You can’t perform that action at this time.
0 commit comments