import { AvatarProps } from '@/components/Avatar';
import { Avatar as AvatarSrc } from '@/index';
import dataverseLogo from '@/assets/icon/dataverseLogo.svg';
import redError from '@/assets/icon/redError.svg';

export default {
  title: 'components',
  args: {
    imgSrc: dataverseLogo,
    fallback: redError,
    size: 'default',
    borderless: false,
  },
};

export const Avatar: React.FC<AvatarProps> = ({
  imgSrc,
  fallback,
  size,
  borderless,
}) => {
  return (
    <>
      normal avatar
      <AvatarSrc imgSrc={imgSrc} size={size} borderless={borderless} />
      fallback avatar
      <AvatarSrc
        imgSrc={'something goes wrong'}
        fallback={fallback}
        size={size}
        borderless={borderless}
      />
    </>
  );
};
