Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -477,11 +477,11 @@ exports[`AvatarScreen renders screen 1`] = `
},
{
"backgroundColor": "transparent",
"color": "#CD4700",
"color": "#9E3900",
"lineHeight": undefined,
},
{
"color": "#CD4700",
"color": "#9E3900",
},
],
]
Expand Down Expand Up @@ -776,7 +776,7 @@ exports[`AvatarScreen renders screen 1`] = `
{
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "#116DFF",
"backgroundColor": "#0F62E6",
"borderRadius": 999,
"justifyContent": "center",
"overflow": "hidden",
Expand Down Expand Up @@ -1034,7 +1034,7 @@ exports[`AvatarScreen renders screen 1`] = `
{
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "#116DFF",
"backgroundColor": "#0F62E6",
"borderRadius": 999,
"justifyContent": "center",
"overflow": "hidden",
Expand Down Expand Up @@ -1292,7 +1292,7 @@ exports[`AvatarScreen renders screen 1`] = `
{
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "#116DFF",
"backgroundColor": "#0F62E6",
"borderRadius": 999,
"justifyContent": "center",
"overflow": "hidden",
Expand Down Expand Up @@ -1759,7 +1759,7 @@ exports[`AvatarScreen renders screen 1`] = `
{
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "#116DFF",
"backgroundColor": "#0F62E6",
"borderRadius": 999,
"justifyContent": "center",
"overflow": "hidden",
Expand Down Expand Up @@ -2617,7 +2617,7 @@ exports[`AvatarScreen renders screen 1`] = `
"top": 0,
},
{
"backgroundColor": "#116DFF",
"backgroundColor": "#0F62E6",
},
{
"bottom": 1,
Expand Down Expand Up @@ -3142,7 +3142,7 @@ exports[`AvatarScreen renders screen 1`] = `
{
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "#116DFF",
"backgroundColor": "#0F62E6",
"borderRadius": 999,
"justifyContent": "center",
"overflow": "hidden",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4387,7 +4387,7 @@ exports[`TextField Screen renders screen 1`] = `
"textAlign": "right",
},
{
"color": "#116DFF",
"color": "#0F62E6",
},
],
]
Expand Down Expand Up @@ -5144,7 +5144,7 @@ exports[`TextField Screen renders screen 1`] = `
"lineHeight": 24,
},
{
"color": "#116DFF",
"color": "#0F62E6",
},
undefined,
undefined,
Expand Down
6 changes: 3 additions & 3 deletions src/style/__tests__/colors.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,17 +278,17 @@ describe('style/Colors', () => {
it('should return the system color, if the color is included in the validColors array', () => {
expect(uut.getSystemColorByHex('#FFFFFF', GetColorsByHexOptions)).toEqual('white');
expect(uut.getSystemColorByHex('#000000', GetColorsByHexOptions)).toEqual('black');
expect(uut.getSystemColorByHex('#116DFF', {validColors: [...SYSTEM_COLORS, 'blue']})).toEqual('blue30');
expect(uut.getSystemColorByHex('#0F62E6', {validColors: [...SYSTEM_COLORS, 'blue']})).toEqual('blue30');
expect(uut.getSystemColorByHex('#FB6413', {validColors: [...SYSTEM_COLORS, 'orange']})).toEqual('orange30');
});

it('should return undefined if the color is not included in validColors', () => {
expect(uut.getSystemColorByHex('#116DFF', GetColorsByHexOptions)).toEqual(undefined);
expect(uut.getSystemColorByHex('#0F62E6', GetColorsByHexOptions)).toEqual(undefined);
expect(uut.getSystemColorByHex('#00A87E', GetColorsByHexOptions)).toEqual(undefined);
});

it('without validColors array the function will return the first system color name match the color', () => {
expect(uut.getSystemColorByHex('#116DFF')).toEqual('blue30');
expect(uut.getSystemColorByHex('#0F62E6')).toEqual('blue30');
expect(uut.getSystemColorByHex('#00A87E')).toEqual('green30');
});

Expand Down
2 changes: 1 addition & 1 deletion src/style/colorsPalette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const colorsPalette = {
blue5: '#0C3E9D',
blue10: '#0F4DC4',
blue20: '#0F59E6',
blue30: '#116DFF',
blue30: '#0F62E6',
blue40: '#3582FF',
blue50: '#81B4FF',
blue60: '#97C7FF',
Expand Down
14 changes: 6 additions & 8 deletions src/style/designTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@ export default {
$textDefaultLight: colorsPalette.white,
$textPrimary: colorsPalette.violet30,
$textGeneral: colorsPalette.blue30,
$textSuccess: colorsPalette.green10,
$textSuccess: colorsPalette.green5,
$textSuccessLight: colorsPalette.green30,
$textMajor: colorsPalette.orange10,
$textDanger: colorsPalette.red10,
//textDangerLight should be deprecated
$textMajor: colorsPalette.orange5,
$textDanger: colorsPalette.red5,
$textDangerLight: colorsPalette.red10,

// ICON
Expand All @@ -55,11 +54,10 @@ export default {
$iconPrimaryLight: colorsPalette.violet50,
$iconGeneral: colorsPalette.blue30,
$iconGeneralLight: colorsPalette.blue50,
$iconSuccess: colorsPalette.green10,
$iconSuccess: colorsPalette.green5,
$iconSuccessLight: colorsPalette.green30,
$iconMajor: colorsPalette.orange10,
$iconDanger: colorsPalette.red10,
//iconDangerLight should be deprecated
$iconMajor: colorsPalette.orange5,
$iconDanger: colorsPalette.red5,
$iconDangerLight: colorsPalette.red10,
$iconDisabled: colorsPalette.grey50,

Expand Down