Skip to content

Commit cce9190

Browse files
Align color names and values with UI design (#84)
Resolves: observation/app#1179
1 parent aff4161 commit cce9190

30 files changed

Lines changed: 109 additions & 114 deletions

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@observation.org/react-native-components",
3-
"version": "1.70.0",
3+
"version": "1.71.0",
44
"main": "src/index.ts",
55
"repository": "git@github.com:observation/react-native-components.git",
66
"author": "Observation.org",

src/components/BackButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const BackButton = ({ navigation }: Props) => (
1313
<IconButton
1414
containerStyle={{ padding: theme.margin.common }}
1515
onPress={() => navigation.goBack()}
16-
icon={{ name: 'chevron-left', size: theme.icon.size.extraExtraLarge, color: theme.color.primary }}
16+
icon={{ name: 'chevron-left', size: theme.icon.size.extraExtraLarge, color: theme.color.primary500 }}
1717
/>
1818
)
1919

src/components/BottomSheet.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const styles = StyleSheet.create({
6363
container: {
6464
...theme.shadow.ios,
6565
borderTopWidth: 1 / 3,
66-
borderTopColor: theme.color.greySemi,
66+
borderTopColor: theme.color.grey300,
6767
},
6868
bottomSheetContainer: {
6969
...theme.shadow.android,

src/components/BrandIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type Props = {
1313

1414
export const BrandIcon = ({ name, color, size }: Props) => {
1515
const icon = BrandIcons[name]
16-
const iconColor = color ?? theme.color.primary
16+
const iconColor = color ?? theme.color.primary500
1717
const iconSize = size ?? theme.icon.size.large
1818
const FontAwesomeIconTypeErased = FontAwesomeIcon as unknown as any
1919

src/components/Chip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const styles = StyleSheet.create({
4949
fontSize: theme.font.size.medium,
5050
},
5151
chipContainer: {
52-
backgroundColor: theme.color.successLight,
52+
backgroundColor: theme.color.accentLime400,
5353
paddingHorizontal: theme.margin.common,
5454
paddingVertical: theme.margin.half,
5555
borderRadius: theme.margin.common,

src/components/ContentImage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const styles = StyleSheet.create({
6767
...theme.shadow.android,
6868
...theme.roundedLarge,
6969
borderWidth: 1,
70-
borderColor: theme.color.greyLight,
70+
borderColor: theme.color.grey50,
7171
},
7272
imageContainer: {
7373
margin: theme.margin.common,
@@ -91,6 +91,6 @@ const styles = StyleSheet.create({
9191
},
9292
description: {
9393
...font.small,
94-
color: theme.color.greyBase,
94+
color: theme.color.grey500,
9595
},
9696
})

src/components/Date.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type Props = {
1313

1414
const Date = ({ date, containerStyle }: Props) => (
1515
<IconText
16-
icon={<Icon name="calendar-day" style={'solid'} color={theme.color.greySemi} size={theme.icon.size.medium} />}
16+
icon={<Icon name="calendar-day" style={'solid'} color={theme.color.grey300} size={theme.icon.size.medium} />}
1717
text={date}
1818
style={{
1919
containerStyle,

src/components/FilterButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type Props = {
1212

1313
const FilterButton = ({ content, onPress, active = false, style }: Props) => {
1414
const buttonStyle = active ? styles.activeButton : styles.button
15-
const contentColor = active ? theme.color.white : theme.color.greyDark
15+
const contentColor = active ? theme.color.white : theme.color.grey800
1616
return (
1717
<TouchableOpacity
1818
testID="touchable-opacity"
@@ -36,6 +36,6 @@ const styles = StyleSheet.create({
3636
backgroundColor: theme.color.white,
3737
},
3838
activeButton: {
39-
backgroundColor: theme.color.primary,
39+
backgroundColor: theme.color.primary500,
4040
},
4141
})

src/components/Icon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export type IconProps = IconAppearanceProps & {
2222
export const Icon = ({ name, color, size, testID, style, rotation }: IconProps): React.ReactElement => {
2323
const iconStyle = style ?? 'light'
2424
const icon = iconStyle === 'light' ? Icons[name].light : Icons[name].solid
25-
const iconColor = color ?? theme.color.primary
25+
const iconColor = color ?? theme.color.primary500
2626
const iconSize = size ?? theme.icon.size.large
2727
const transform = rotation ? { rotate: rotation } : undefined
2828

src/components/InputField.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ const InputField = ({
4343
const hasErrors = !!errorMessage
4444
const borderColor = theme.getBorderColor({ isFocused, hasErrors })
4545

46-
const inputContainerStyle = disabled ? { backgroundColor: theme.color.greyLight } : {}
47-
const placeholderTextColor = disabled ? theme.color.greySemi : theme.color.placeholder
46+
const inputContainerStyle = disabled ? { backgroundColor: theme.color.grey50 } : {}
47+
const placeholderTextColor = disabled ? theme.color.grey300 : theme.color.grey500
4848

4949
const layoutHandler = inputProps?.autoFocus
5050
? () => {
@@ -82,7 +82,7 @@ const InputField = ({
8282
</View>
8383
{errorMessage && (
8484
<IconText
85-
icon={<Icon name="exclamation-triangle" size={theme.icon.size.small} color={theme.color.error} />}
85+
icon={<Icon name="exclamation-triangle" size={theme.icon.size.small} color={theme.color.error500} />}
8686
text={errorMessage}
8787
style={{
8888
textStyle: [styles.errorStyle, errorStyle],
@@ -117,10 +117,10 @@ const styles = StyleSheet.create({
117117
},
118118
errorStyle: {
119119
...font.small,
120-
color: theme.color.error,
120+
color: theme.color.error500,
121121
},
122122
descriptionStyle: {
123123
...font.small,
124-
color: theme.color.greyDark,
124+
color: theme.color.grey800,
125125
},
126126
})

0 commit comments

Comments
 (0)