feat(ui) updateTheme helper for client branding

This commit is contained in:
Calin Chitu 2021-11-23 15:02:23 +02:00 committed by Calinteodor
parent 14a422ba83
commit 5d1bf9e649
3 changed files with 34 additions and 3 deletions

View File

@ -19,6 +19,8 @@ export const colors = {
primary09: '#CCDDF9',
primary10: '#17A0DB',
primary11: '#1081B2',
primary12: '#0077E1',
primary13: '#263A4C',
surface00: '#111111',
surface01: '#040404',
@ -34,6 +36,17 @@ export const colors = {
surface11: '#FFF',
surface12: '#AAAAAA',
surface13: '#495258',
surface14: '#1C2025',
surface15: '#5E6D79',
surface16: '#D7E6F9',
surface17: '#FADBDB',
surface18: '#F1F2F6',
surface19: '#DBC5C8',
surface20: '#00030660',
surface21: '#F9F9F9',
surface22: '#2A3A4B',
surface23: '#5E6D7A',
surface24: '#A4B8D160',
success04: '#189B55',
success05: '#1EC26A',
@ -41,6 +54,8 @@ export const colors = {
warning05: '#F8AE1A',
warning06: '#ED9E1B',
warning07: '#D77976',
warning08: '#BA273A',
warning09: '#E12D2D',
disabled01: '#00000040',
@ -52,7 +67,10 @@ export const colors = {
support06: '#6A50D3',
support07: '#4380E2',
support08: '#00A8B3',
support09: '#2AA076'
support09: '#2AA076',
support10: '#31B76A30',
highlight01: '#51D6AA'
};
// Mapping between the token used and the color

View File

@ -3,11 +3,13 @@
import { font, colors, colorMap, spacing, shape, typography } from '../Tokens';
import { createNativeTheme } from '../functions.native';
export default createNativeTheme({
import updateTheme from './updateTheme';
export default createNativeTheme(updateTheme({
font,
colors,
colorMap,
spacing,
shape,
typography
});
}));

View File

@ -0,0 +1,11 @@
// @flow
/**
* Custom theme for setting client branding.
*
* @param {Object} theme - The ui tokens theme object.
* @returns {Object}
*/
export default function updateTheme(theme: Object) {
return theme;
}