Skip to content

Latest commit

 

History

History
57 lines (40 loc) · 5.43 KB

customizing-the-styling.md

File metadata and controls

57 lines (40 loc) · 5.43 KB

Customizing the Styling

The files placed in the src file tree will replace files during the build in the dock-app repo. This allows the white label build to have custom colors and styling.

Theme

The app theme can be customized using the values in the ../src/design-system/theme.js file. The javascript file contains three customizable variables:

  • Theme: Contains the following variables:
    • borderRadius determines the radius of some card-like elements, e.g Modals.
    • touchOpacity the opacity of pressable items that should indicate pressed state
  • COLORS: Determines the color scheme of the entire application. It uses a color pallet system (You can generate a color pallet using any of the tools like JSON Color Palette Generator, Smart Swatch, or Palx). This section contains the following main colors:
    • primary: primary brand color pallet.
    • primaryButton: range 200-600 pallet for primary button phases (disabled, pressed, etc.) and a text value to set the color of the primary button text.
    • secondaryButton: range 200-600 pallet for secondary button phases (disabled, pressed, etc.) and a text value to set the color of secondary button texts.
    • secondary: with only 400 and 600 values in the pallet, they is used as accent backgrounds in sections of the application. To maintain contrast in values are recommended to be dark colored for dark themed customization and light for light themed customization.
    • neutral: a pallet for background and text colors. Contrast between 1 and 900 should be as much as possible, with light theme ranging from very dark(e.g {1: "black"}) to very light (e.g {900: "white}) and dark theme ranging the opposite way
    • orange: test mode indicator background and text colors
    • teal: validity inidicator colors
    • blue: used once for information box background.
    • warning: pending state indicator color
    • error: error state indicotor pallet
    • backdrop: used for modal backdrop transparency (dark)
    • whiteBackdrop: used for modal backdrop transparency (light)
    • warningBg: warning box background
  • baseTheme: This should require no much changes. However if there is a need to change the style for specific components, this can be updated based on nativebase guideline.

See examples of white labeled wallet designs

Images

The app icon and the splash screen logo can be customized on the app.

TIP You can use tools like https://www.appicon.co to auto-size your images to the appropriate sizes.

Updating the Splash Screen Logo

There are two logos with sizes variations available for customization, they need to be replaced in the following folders.

{% hint style="warning" %} Please ensure that the image width matches while allowing the height to be flexible. Avoid adding empty margins to fill the remaining height. {% endhint %}

Icon Size Example Icon Size Example
382 x 128 318 x 72
850 x 192 425 x 96
212 x 48 637 x 144
212 x 48 850 x 192

Updating the App Icon

The app icon should be a .png file and needs to be replaced with your custom app icon in these sizes.

Android icon sizeExampleiOS icon sizeExample
120 x 12040 x 40
48 x 4858 x 58
72 x 7260 x 60
96 x 9680 x 80
144 x 14487 x 87
192 x 192120 x 120
180 x 180
1024 x 1024