We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d99a5c commit d443203Copy full SHA for d443203
src/Alert/index.tsx
@@ -20,19 +20,15 @@ export interface AlertProps {
20
export function Alert(props: AlertProps) {
21
const {
22
variant = 'default',
23
- icon = variant === 'default' ? (
24
- <InfoIcon className="sr-w-4 sr-h-4" />
25
- ) : (
26
- <AlertTriangleIcon className="sr-w-4 sr-h-4" />
27
- ),
+ icon = variant === 'default' ? <InfoIcon /> : <AlertTriangleIcon />,
28
title,
29
children,
30
...restProps
31
} = props;
32
33
return (
34
<UiAlert variant={variant} {...restProps}>
35
- <div className="sr-flex">
+ <div className="sr-flex [&>svg]:sr-w-4 [&>svg]:sr-h-4">
36
{icon}
37
<div className="sr-ml-3">
38
{title != null && (
0 commit comments