0.0.0 • Published 2 years ago

@wedgekit/avatar v0.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Avatar

Purpose

The Avatar component displays information about a user.

Basic Implementation

import Avatar from '@wedgekit/avatar';

const Example = () => <Avatar color="T100">Bilbo Baggins</Avatar>;

render(<Example />);

API

PropTypeRequired?defaultdescription
childrenstringA name or number that will be converted to initials or a count. If children is not provided or the component is used as a self closing component, Avatar will render a Plus icon.
colorstringA valid WedgeKit tag color.
outlinebooleanfalseWhether or not the avatar is in outline mode.
size"small" \| "medium" \| "large"medium
darkbooleanfalseWhether or not the focus state should be white. This is useful when the element is on a darker background and needs higher contrast for focus.
onClick(HTMLClickEvent) => {}When present the avatar is interactive and can receive focus. Otherwise it will be for display only.