1
0
mirror of https://github.com/SomboChea/ui synced 2024-10-01 05:47:50 +07:00
verdaccio-ui/src/muiComponents/Avatar/Avatar.tsx

12 lines
433 B
TypeScript
Raw Normal View History

2019-10-06 23:30:05 +07:00
import React, { forwardRef } from 'react';
import { default as MaterialUIAvatar, AvatarProps } from '@material-ui/core/Avatar';
// The default element type of MUI's Avatar is 'div' and we don't allow the change of this prop
type AvatarRef = HTMLElementTagNameMap['div'];
const Avatar = forwardRef<AvatarRef, AvatarProps>(function Avatar(props, ref) {
return <MaterialUIAvatar {...props} ref={ref} />;
});
export default Avatar;