Home > wq Framework > Icon Components

Icon Components

@wq/react and @wq/material define a vocabulary of icons to use throughout the app, particularly as the icon prop for <Button/>, <IconButton/>, <Fab/>, and <ListItem/>. The icon prop is specified as a string which is mapped to a component (in web), or to the name of a font icon (in native).

Note that by default, @wq/material components that use the icon prop will only accept the names listed below. To add more material icons to the vocabulary, register them via a custom icons plugin.

Icon Component icon Prop Value Description
Add Add "add" Used for “Add New Record” <Fab/> in <DefaultList/>
Edit Edit "edit" Used for “Edit This Record” <Fab/> in <DefaultDetail/>
Delete Delete "delete" Used for <DeleteForm/> in DefaultEdit
Success Success "success" Shown in <OutboxList/> for synced records
Error Error "error" Shown in <OutboxList/> for failed sync attempts
Pending Pending "pending" Shown in <OutboxList/> for currently syncing records
GpsStart GpsStart "gps-start" Used in Geo input component
GpsStop GpsStop "gps-stop" Used in Geo input component
Search Search "search" Used in Geo input component

The default icons are defined in @wq/material’s src/icons.js and src/icons.native.js.