mirror of
https://github.com/SomboChea/ui
synced 2024-11-16 11:14:26 +07:00
12 lines
419 B
TypeScript
12 lines
419 B
TypeScript
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 = HTMLDivElement;
|
|
|
|
const Avatar = forwardRef<AvatarRef, AvatarProps>(function Avatar(props, ref) {
|
|
return <MaterialUIAvatar {...props} ref={ref} />;
|
|
});
|
|
|
|
export default Avatar;
|