You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Aziface SDK provides the ability to change the theme of each flow. You can modify background colors, borders, text, border radius, among other things. We recommend changing the theme before calling the `initialized`method so that the style changes are applied.
3
+
The Aziface SDK provides the ability to change the theme of each flow. You can modify background colors, borders, text, border radius, among other things. We recommend changing the theme before calling the `initialized`function so that the style changes are applied.
4
4
5
5
<hr/>
6
6
@@ -22,11 +22,14 @@ The Aziface SDK provides the ability to change the theme of each flow. You can m
|`textBackgroundColor`|`string`| All | ❌ |`#ffffff`|
445
+
|`backgroundColor`|`string`| All | ❌ |`#026ff4`|
446
+
|`frameStrokeColor`|`string`| All | ❌ |`#ffffff`|
447
+
|`font`|`string`| All | ❌ |`undefined`|
426
448
427
449
#### `ThemeShadow` (iOS only)
428
450
@@ -462,19 +484,19 @@ An object containing the shadow offset styles used in screen.
462
484
463
485
The `branding` and `cancel` properties represents your branding and icon of the button cancel. Does not possible to remove them from the module. Default are [Azify](https://www.azify.com/) images and `.png` format. By default in `Android` the branding image is shown, but on `iOS` it isn't shown, It's necessary to add manually.
464
486
465
-
### How to add images in Android?
487
+
### Android
466
488
467
489
To add your images in `Android`, you must go to your project's `android/src/main/res/drawable` directory. If in your project `drawable` folder doesn't exist, it create one. Inside the `drawable` folder, you must put your images and done!
468
490
469
491
**Important**: The filename of the image can't have uppercase letters, Android doesn't accept these characters in the image name.
470
492
471
-
### How to add images in iOS?
493
+
### iOS
472
494
473
495
In `iOS`, open your XCode and go to your project's `ios/<YOUR_PROJECT_NAME>/Images.xcassets` directory. Open the `Images.xcassets` folder and only put your images inside there.
474
496
475
-
### Example with images added
497
+
### Example
476
498
477
-
Now, go back to where you want to apply the styles, import `setTheme`method and add only the image name, no extension format, in image property (`branding` or `cancel`). **Note**: If the image is not founded the default image will be showed. Check the code example below:
499
+
Now, go back to where you want to apply the styles, import `setTheme`function and add only the image name, no extension format, in image property (`branding` or `cancel`). **Note**: If the image is not founded the default image will be showed. Check the code example below:
478
500
479
501
```tsx
480
502
import { useEffect } from'react';
@@ -514,6 +536,79 @@ export default function App() {
514
536
515
537
<hr/>
516
538
539
+
## Custom Fonts
540
+
541
+
The Aziface SDK allows changing the font family style to each the session.
542
+
543
+
### Android
544
+
545
+
In Android, you should add all fonts in the `android/app/main/assets/fonts` directory path (if your project's `assets/fonts` isn't exists, you should create it), but if the font isn't found, the Aziface SDK uses the default system font. By default, the Aziface SDK searches for your custom fonts there.
546
+
547
+
All extension fonts are supported.
548
+
549
+
### iOS
550
+
551
+
To add a font file to your XCode project, select File > Add Files to "Your Project Name" from the menu bar, or drag the file from Finder and drop it into your XCode project. You can add True Type Font (`.ttf`) and Open Type Font (`.otf`) files. Also, make sure the font file is a target member of your App, otherwise, the font file will not be distributed as part of your App.
552
+
553
+
After adding the font file to your project, you need to let iOS know about the font. To do this, add the key "Fonts provided by application" to `Info.plist` (the raw key name is `UIAppFonts`). XCode creates an array value for the key, add the name of the font file as an item of the array. Be sure to include the file extension as part of the name.
554
+
555
+
That's **optional**, but you can add the key "Application fonts resource path" to `Info.plist` (the raw key to be used like a font file's resource path). XCode creates a string value for the key, add the directory path of the font file, if your font file is in the main directory you should add a dot (`.`) like value for the key, otherwise, you should provides the path directory correctly the font files. If custom fonts isn't found, the Aziface SDK uses the default system font.
556
+
557
+
Extension fonts supported are: `.ttf` and `.otf`.
558
+
559
+
### Example
560
+
561
+
You should call the `setTheme` function and provides **filename string** as value of the font. If the font isn't found, the Aziface SDK uses the default font.
0 commit comments