Skip to content

Commit 9ca41a5

Browse files
committed
small tweaks
1 parent 4139832 commit 9ca41a5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/contributing/pages/components.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ This is a warning alert. Use these for items that MUST be well understood before
2020
This is an alert without title.
2121
</Alert>
2222

23+
<Alert>
24+
This is a multi-line alert without title. Use these for information that's critical to know; it's important for users to read, but won't cause a catastrophic problem if they don't read it. These include versions that introduce breaking changes or feature limitations. Use infrequently.
25+
</Alert>
26+
2327
<Alert title="List">
2428
<ul>
2529
<li>Item 1</li>

src/components/alert/index.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function Alert({title, children, level = 'info'}: AlertProps) {
1616

1717
return (
1818
<div className={`alert ${'alert-' + level}`} role="alert">
19-
<Icon className='alert-icon' />
19+
<Icon className="alert-icon" />
2020
<div className="alert-content">
2121
{title && <h5 className="alert-header">{title}</h5>}
2222
<div className="alert-body content-flush-bottom">{children}</div>
@@ -30,9 +30,5 @@ type NoteProps = {
3030
};
3131

3232
export function Note({children}: NoteProps) {
33-
return (
34-
<div role="note" className="alert">
35-
<div className="alert-body">{children}</div>
36-
</div>
37-
);
33+
return <Alert>{children}</Alert>;
3834
}

0 commit comments

Comments
 (0)