-
Notifications
You must be signed in to change notification settings - Fork 2
ui components
Valentin Mourot edited this page May 3, 2019
·
7 revisions
This page describes all built-in components for building you modules interface.
/app/ui/avatars/Avatar.tsx
Generic avatar displayer. You shall not directly use it. The image is fetched from the distant server with the userId. Use this generic component to create custom avatar displayers (see below).
Props :
-
count(number): total avatar displayed this way, one by one. Default1. -
decorate(boolean): Add a slight decorative white border. Defaulttrue. Works only withsizeprop toSize.verylarge. -
id(string): usedId used to get the avatar picture -
index(number): index of avatar displayed in the total (count). -
large(boolean): Deprecated. Doesn't do anything. -
size(Size): Can beSize.aligned,Size.large,Size.small, orSize.verylarge. -
width(number): width of the avatar container
/app/ui/avatars/SingleAvatar.tsx
Display a single circle avatar.
Props :
-
userID(string) -
size(number): Size in px. Default 45.
/app/ui/avatars/RowAvatars.tsx
Display a scrollable single row of avatars.
Props :
-
images(string[]): userIds to get avatars. -
size(Size) Can beSize.aligned,Size.large,Size.small, orSize.verylarge. Size of every avatar. -
onSlideIndex((index: number) => void): event called when the users ends a scroll. Passes the index of the avatar touched as an event argument.
/app/ui/avatars/GridAvatars.tsx
Display up to 4 little avatars in a grid.
Props :
-
users(String[]): userIds to get avatars.