Skip to content

Commit d443203

Browse files
committed
fix(alert): fix icon size
1 parent 6d99a5c commit d443203

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/Alert/index.tsx

+2-6
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,15 @@ export interface AlertProps {
2020
export function Alert(props: AlertProps) {
2121
const {
2222
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-
),
23+
icon = variant === 'default' ? <InfoIcon /> : <AlertTriangleIcon />,
2824
title,
2925
children,
3026
...restProps
3127
} = props;
3228

3329
return (
3430
<UiAlert variant={variant} {...restProps}>
35-
<div className="sr-flex">
31+
<div className="sr-flex [&>svg]:sr-w-4 [&>svg]:sr-h-4">
3632
{icon}
3733
<div className="sr-ml-3">
3834
{title != null && (

0 commit comments

Comments
 (0)