2024-09-23 11:14:24 +00:00
|
|
|
# Importing assets from Figma into project
|
2020-05-06 07:51:32 +00:00
|
|
|
|
2024-09-23 11:14:24 +00:00
|
|
|
## Icons
|
2020-05-06 07:51:32 +00:00
|
|
|
|
2023-01-31 12:06:29 +00:00
|
|
|
![](images/export-icons/export-icons.gif)
|
2020-05-06 07:51:32 +00:00
|
|
|
|
2023-11-07 16:40:24 +00:00
|
|
|
1. Export from figma 2 pngs 2x and 3x put them in `./resources/images/icons2`
|
2020-05-06 07:51:32 +00:00
|
|
|
2. if necessary, rename file so that filename contains only lower case chars, e.g. `"Icon-Name@2x.png"` should be renamed to `"icon_name@2x.png"`.
|
|
|
|
3. In the app `icon_name.png` still can be accessed as `icon-name`, so in order to use can add the next code:
|
|
|
|
```clojure
|
|
|
|
;; icon_name.png
|
|
|
|
[vector-icons/icon :icon-name {:color ...}]
|
|
|
|
```
|
|
|
|
2x@2x
|
2023-10-04 14:54:32 +00:00
|
|
|
4. If you want platform specific icon use `.android` or `.ios` suffixes. Example `icon_name@2x.android.png`.:w
|
2024-09-23 11:14:24 +00:00
|
|
|
|
|
|
|
## Images
|
|
|
|
|
|
|
|
Make sure to compress images before using into project.
|
|
|
|
```
|
|
|
|
make shell
|
2024-10-04 12:32:46 +00:00
|
|
|
./scripts/compress_image.sh image_path
|
2024-09-23 11:14:24 +00:00
|
|
|
```
|