We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afa49ac commit b5359beCopy full SHA for b5359be
src/Alert.tsx
@@ -108,6 +108,7 @@ export const Alert = memo(
108
109
const refShouldButtonGetFocus = useRef(false);
110
const refShouldSetRole = useRef(false);
111
+ const DescriptionTag = typeof description === "string" ? "p" : "div";
112
113
useEffect(() => {
114
if (props_isClosed === undefined) {
@@ -172,7 +173,7 @@ export const Alert = memo(
172
173
{title}
174
</HtmlTitleTag>
175
)}
- <p className={classes.description}>{description}</p>
176
+ <DescriptionTag className={classes.description}>{description}</DescriptionTag>
177
{isClosable && (
178
<button
179
ref={setButtonElement}
0 commit comments