import React from 'react'; import { ComponentMeta } from '@storybook/react'; import { Avatar } from 'components/avatar'; import { Bell, Star, StarFill } from 'icons'; import { AvatarListProps, AvatarList, AvatarUser } from './AvatarList'; export default { title: 'Design System/AvatarList', component: AvatarList, subcomponents: { Avatar, }, argTypes: { colorVariant: { options: [ 'base', 'base-01', 'base-02', 'secondary', 'secondary-01', 'primary', 'primary-01', 'success', 'success-01', 'transparent', ], control: { type: 'select' }, }, }, } as ComponentMeta; const avatarsList: AvatarListType = [ { users: [ { id: '13ert', uri: 'https://avatars.githubusercontent.com/u/39033532', }, { id: '153eft', uri: 'https://avatars.githubusercontent.com/u/68179593', }, { id: '153eft', uri: 'https://avatars.githubusercontent.com/u/68179593', }, ], }, { users: [ { id: '183eft', icon: , }, { id: '883eft', icon: , }, { id: '8t83eft', icon: , }, ], }, { users: [ { id: '8t6h32wft', icon: , }, { id: '8e326h32wft', icon: , }, { id: '8e326h8u2wft', icon: , }, ], }, { users: [ { id: '8e2r63h2wft', title: 'Lebogang Mabala', }, { id: '8e2r63h87jhbd2wft', title: 'Khalil Omer', }, { id: '8e23re63fh87j2wft', title: 'Muhammad Sarmad', }, ], }, ]; export const Interactive: AvatarListTemplate = (args) => { return ( <> {avatarsList.map((avatars) => ( ))} ); }; type AvatarListTemplate = Stories.Template; type AvatarListItem = { users: AvatarUser[]; }; type AvatarListType = AvatarListItem[]; Interactive.args = { size: 30, bordered: true, colorVariant: 'base-01', };