Avatar
Usage
import React from 'react';
import { Avatar } from 'qdm-component-library';
function App() {
return (
<Avatar />
<Avatar
variant='circle'
src={
'https://images.firstpost.com/wp-content/uploads/2017/06/Sundar_Pichai_New.jpg'
}
/>
<Avatar
variant='rounded'
src={
'https://images.firstpost.com/wp-content/uploads/2017/06/Sundar_Pichai_New.jpg'
}
/>
);
}
export default App;
Reference
Props
className
props for providing classname to Badge component string
id
props for providing id to Badge component string
name
props for providing name to Badge component string
src
props for providing image url to Avatar Component string
variant
props for variant for Avatar Component 'circle'| 'rounded'| 'square'
alt
props for providing alternative for src props for Avatar Component string
letter
props for starting letter for Avatar Component string
children
props for providing children for Avatar Component React Node
inLineStyles
props give addition props to the Avatar Component type Object