Skip to content

Commit 100569e

Browse files
authored
Use Colors.primary in components and change primary color to violet30 (#1135)
* Use Colors.primary in components and change primary color to violet30 * Fix typings of primary color * Fix blue30 to primary in some missed components
1 parent c6edd4d commit 100569e

File tree

32 files changed

+96
-93
lines changed

32 files changed

+96
-93
lines changed

demo/src/screens/MainScreen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class MainScreen extends Component {
181181
paddingV-s2
182182
onPress={() => this.openScreen(item)}
183183
onLongPress={() => this.setDefaultScreen(item)}
184-
activeBackgroundColor={Colors.blue40}
184+
activeBackgroundColor={Colors.primary}
185185
activeOpacity={1}
186186
>
187187
<Text style={[item.deprecate && styles.entryTextDeprecated]} dark10 text50>

demo/src/screens/componentScreens/ActionBarScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default class ActionBarScreen extends Component {
4545

4646
<View style={styles.page}>
4747
<ActionBar
48-
backgroundColor={Colors.blue30}
48+
backgroundColor={Colors.primary}
4949
actions={[
5050
{label: 'Hide', onPress: () => Alert.alert('hide'), white: true},
5151
{label: 'Add Discount', onPress: () => Alert.alert('add discount'), white: true},

demo/src/screens/componentScreens/ButtonsScreen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ export default class ButtonsScreen extends Component {
318318

319319
<Button
320320
style={{marginBottom: ButtonSpace}}
321-
blue30
321+
primary
322322
outline
323323
iconSource={plusIcon}
324324
label="Icon"
@@ -339,7 +339,7 @@ export default class ButtonsScreen extends Component {
339339
style={{marginBottom: ButtonSpace}}
340340
>
341341
<Image source={plusIcon} />
342-
<Text style={{marginLeft: 10, color: Colors.blue30}}>
342+
<Text marginL-10 primary>
343343
Custom Icon
344344
</Text>
345345
</Button>

generatedTypes/components/badge/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ declare function createStyles(props: BadgeProps): {
108108
badge: {
109109
alignSelf: "flex-start";
110110
borderRadius: number;
111-
backgroundColor: any;
111+
backgroundColor: string | undefined;
112112
alignItems: "center";
113113
justifyContent: "center";
114114
overflow: "hidden";

generatedTypes/components/card/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ declare const _default: React.ComponentClass<ViewProps & Pick<import("react-nati
7272
} | undefined;
7373
activeBackgroundColor?: string | undefined;
7474
useNative?: boolean | undefined;
75-
customValue?: any; /**
75+
customValue?: any;
76+
/**
7677
* card custom height
7778
*/
7879
style?: false | {} | ViewStyle | import("react-native").RegisteredStyle<ViewStyle> | import("react-native").RecursiveArray<false | ViewStyle | import("react-native").RegisteredStyle<ViewStyle> | null | undefined> | {

generatedTypes/incubator/TextField/presets/default.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ declare const _default: {
22
enableErrors: boolean;
33
validateOnBlur: boolean;
44
floatingPlaceholderColor: {
5-
focus: any;
5+
focus: string;
66
error: any;
77
disabled: string;
88
};
99
labelColor: {
10-
focus: any;
10+
focus: string;
1111
error: any;
1212
disabled: string;
1313
};

generatedTypes/incubator/TextField/usePreset.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
10151015
error?: string | undefined;
10161016
disabled?: string | undefined;
10171017
} | {
1018-
focus: any;
1018+
focus: string;
10191019
error: any;
10201020
disabled: string;
10211021
};
@@ -1061,7 +1061,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
10611061
error?: string | undefined;
10621062
disabled?: string | undefined;
10631063
} | {
1064-
focus: any;
1064+
focus: string;
10651065
error: any;
10661066
disabled: string;
10671067
};

generatedTypes/style/colors.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,5 +125,7 @@ declare const colorObject: Colors & {
125125
violet80: string;
126126
white: string;
127127
black: string;
128+
} & {
129+
primary: string;
128130
};
129131
export default colorObject;

lib/components/WheelPicker/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class WheelPicker extends Component {
4646

4747
static defaultProps = {
4848
labelStyle: {fontSize: Typography.text70.fontSize, fontFamily: Typography.text70.fontFamily},
49-
color: Colors.blue30
49+
color: Colors.primary
5050
};
5151

5252
constructor(props) {

src/components/actionBar/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class ActionBar extends Component<ActionBarProps> {
7474
<View row centerV paddingH-20={!centered} style={[this.styles.container, style]} {...others}>
7575
{_.map(actions, (action, i) => (
7676
<View key={i} flex {...this.getAlignment(i)}>
77-
<Button link size={Button.sizes.medium} blue30 {...action}/>
77+
<Button link size={Button.sizes.medium} primary {...action}/>
7878
</View>
7979
))}
8080
</View>

src/components/avatar/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ function createStyles(props: AvatarProps) {
382382
lineHeight: undefined
383383
},
384384
ribbon: {
385-
backgroundColor: Colors.blue30,
385+
backgroundColor: Colors.primary,
386386
paddingHorizontal: 6,
387387
paddingVertical: 3
388388
}

0 commit comments

Comments
 (0)