Skip to content

Commit 38f99f5

Browse files
committed
[theme/fix] Change lightGrey -> lightGray
1 parent 45275d7 commit 38f99f5

File tree

8 files changed

+16
-16
lines changed

8 files changed

+16
-16
lines changed

__test__/Badge.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('Badge', () => {
3131
error: { color: 'pink' },
3232
info: { color: 'blue' },
3333
gray: { color: 'red' },
34-
lightGrey: { color: 'green' },
34+
lightGray: { color: 'green' },
3535
warning: { color: 'blue' },
3636
},
3737
};

__test__/CheckBox.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe('CheckBox Component', () => {
3636
error: { color: 'pink' },
3737
info: { color: 'blue' },
3838
gray: { color: 'red' },
39-
lightGrey: { color: 'green' },
39+
lightGray: { color: 'green' },
4040
warning: { color: 'blue' },
4141
},
4242
};

__test__/utils.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,18 +276,18 @@ describe('getVariant', () => {
276276
expect(result).toBe(defaultLightTheme.colors.gray[500]);
277277
});
278278

279-
it('should return lightGrey color from config if available', () => {
279+
it('should return lightGray color from config if available', () => {
280280
const result = getVariant({
281-
variant: 'lightGrey',
281+
variant: 'lightGray',
282282
colors: defaultLightTheme.colors,
283-
config: { lightGrey: { color: '#EEEEEE' } },
283+
config: { lightGray: { color: '#EEEEEE' } },
284284
});
285285
expect(result).toBe('#EEEEEE');
286286
});
287287

288-
it('should return lightGrey color from colors fallback if not in config', () => {
288+
it('should return lightGray color from colors fallback if not in config', () => {
289289
const result = getVariant({
290-
variant: 'lightGrey',
290+
variant: 'lightGray',
291291
colors: defaultLightTheme.colors,
292292
});
293293
expect(result).toBe(defaultLightTheme.colors.gray[200]);

src/components/ActivityIndicator/ActivityIndicator.styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const colorConfig: GetVariantArgs<unknown>['config'] = {
1111
success: { color: green[500] },
1212
warning: { color: yellow[500] },
1313
gray: { color: gray[50] },
14-
lightGrey: { color: gray[500] },
14+
lightGray: { color: gray[500] },
1515
};
1616

1717
export const getActivityIndicatorColor = ({ variant, colors, switchMode }: GetActivityIndicatorColor): ColorValue => {

src/components/Alert/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ export const getAlertTitleStyles = ({ variant, variation, colorScheme }: GetAler
2121
const isLight = colorScheme === 'light';
2222

2323
const isWarningVariant = variant === 'warning';
24-
const isLightGreyVariant = variant === 'lightGrey';
24+
const islightGrayVariant = variant === 'lightGray';
2525
const isOutlinedAlert = variation === 'outlined';
2626

27-
if (isLightGreyVariant && isLight) {
27+
if (islightGrayVariant && isLight) {
2828
return { color: gray[900] };
2929
}
3030

src/components/Button/Button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export const Button = React.forwardRef<View, ButtonProps>(
177177
} else if (buttonThemeConfig?.labelColor) {
178178
textColor = buttonThemeConfig.labelColor;
179179
} else if (isContainedButton) {
180-
if (buttonColor === 'lightGrey') {
180+
if (buttonColor === 'lightGray') {
181181
textColor = themeColors.gray[900];
182182
_loadingIndicatorColor = themeColors.gray[900];
183183
} else if (buttonColor === 'warning') {
@@ -186,7 +186,7 @@ export const Button = React.forwardRef<View, ButtonProps>(
186186
} else {
187187
textColor = gray[50];
188188
}
189-
} else if (isOutlinedButton && (buttonColor === 'gray' || buttonColor === 'lightGrey')) {
189+
} else if (isOutlinedButton && (buttonColor === 'gray' || buttonColor === 'lightGray')) {
190190
textColor = themeColors.gray[900];
191191
} else {
192192
textColor = getVariant({ variant: buttonColor, colors: themeColors });

src/components/Chip/Chip.style.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export const labelStyles = ({
9393
color === 'gray'
9494
) {
9595
textColor = gray[50];
96-
} else if (color === 'lightGrey') {
96+
} else if (color === 'lightGray') {
9797
textColor = colors.gray[800];
9898
} else if (color === 'warning') {
9999
textColor = gray[800];

src/utils/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const WRAPPER_BOTTOM_OFFSET = 50;
99
* Define the allowed variant types for themes, used to categorize styles like primary, secondary, etc.
1010
* These variants can be used to specify different styling options.
1111
*/
12-
export type VariantTypes = 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning' | 'gray' | 'lightGrey';
12+
export type VariantTypes = 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning' | 'gray' | 'lightGray';
1313
/**
1414
* Interface for default options that can be applied to variations.
1515
* The `color` property is optional and represents the color value for the variation.
@@ -51,8 +51,8 @@ export const getVariant = <T>({ variant, colors, config }: GetVariantArgs<T>): C
5151
return config?.warning?.color ?? colors.yellow[500];
5252
} else if (variant === 'gray') {
5353
return config?.gray?.color ?? colors.gray[500];
54-
} else if (variant === 'lightGrey') {
55-
return config?.lightGrey?.color ?? colors.gray[200];
54+
} else if (variant === 'lightGray') {
55+
return config?.lightGray?.color ?? colors.gray[200];
5656
}
5757
return colors.secondary[500];
5858
};

0 commit comments

Comments
 (0)