Skip to content

Commit aa5e805

Browse files
refactor(Illustration): extend props type
1 parent ad7742a commit aa5e805

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

src/components/Illustration/Illustration.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import {useEffect, useState} from 'react';
1+
import {ImgHTMLAttributes, useEffect, useState} from 'react';
22
import cn from 'bem-cn-lite';
33
import {useThemeValue} from '@gravity-ui/uikit';
44

5-
export interface IllustrationProps {
5+
export interface IllustrationProps extends ImgHTMLAttributes<HTMLImageElement> {
66
name: string;
77
className?: string;
88
}
@@ -38,12 +38,5 @@ export const Illustration = ({name, className, ...props}: IllustrationProps) =>
3838
}
3939
}, [srcGetter]);
4040

41-
return (
42-
<img
43-
alt={name}
44-
src={src}
45-
className={b(null, className)}
46-
{...props}
47-
/>
48-
);
49-
}
41+
return <img alt={name} src={src} className={b(null, className)} {...props} />;
42+
};

0 commit comments

Comments
 (0)