-
Notifications
You must be signed in to change notification settings - Fork 2
Icons and Icon font
Valentin Mourot edited this page Mar 28, 2022
·
2 revisions
/app/ui/icons/Icon.tsx
The <Icon>
component is used to display icons from the mobile icon font.
Props :
-
color
(string): Icon color -
name
(string): Name of the icon in the icon font -
paddingHorizontal
: (number) Corresponds to the style property "paddingHorizontal" -
size
(number): Size of the icon (in fontSize unit) -
focused
(boolean): _Don't know what is it for _
/app/ui/icons/IconOnOff.tsx
An icon that changes whenever it is considered as "on" or as "off".
Props :
-
name
(string): Name on the icon set. Computed icon names will be <name>-on and <name>-off ans must exist in the icon font. -
focused
(boolean): Controls whenever the icon is considered as "on" or "off".
... All other Icon props.
/app/ui/icons/SearchIcon.tsx
exports a certain number of icon components that are just <Icon>
with a predefined name, size (22) and color (white). Used for common header icons. Available icons are <SearchIcon>
and <CloseIcon>
.
This icon font is made with the Icomoon.io tool. To update the icon font, just follow these steps :
- Open the IcoMoon App (with a button in the upper right corner).
- In the middle tab ("Selection"), delete every icon.
- Import by dragging the
/assets/selection.json
file. This will import all the icon font in IcoMoon. - Use IcoMoon interface to update the icon font.
- Select all the icon and click on the "Generate Font" tab.
- Click on the button "Download" and unarchive the resulting zip file.
- Replace the previous
/assets/selection.json
with theselection.json
in the resulting archive. - Replace the previous
/ios/Fonts/icomoon.ttf
with theicomoon.ttf
in the resulting archive. - Replace the previous
/android/app/src/main/assets/fonts/icomoon.ttf
with theicomoon.ttf
in the resulting archive. - Commit and enjoy