Skip to content

Commit 79055ae

Browse files
committed
feat:Snackbar modified
1 parent 8d4b61c commit 79055ae

File tree

6 files changed

+48
-41
lines changed

6 files changed

+48
-41
lines changed

.eslintrc

+30-30
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
{
2-
"env": {
3-
"browser": true
2+
"env": {
3+
"browser": true
4+
},
5+
"extends": "@react-native-community",
6+
"parser": "@typescript-eslint/parser",
7+
"plugins": ["@typescript-eslint"],
8+
"rules": {
9+
"one-var": "off",
10+
"no-multi-assign": "off",
11+
"no-nested-ternary": "off",
12+
"no-undef": "off",
13+
"global-require": "off",
14+
15+
"import/no-extraneous-dependencies": "off",
16+
"import/first": "off",
17+
18+
"react-native/no-unused-styles": "error",
19+
"react-native/split-platform-components": "off",
20+
"react-native/no-raw-text": "off"
21+
},
22+
23+
"settings": {
24+
"import/extensions": [".js", ".ts", ".tsx"],
25+
"import/parsers": {
26+
"@typescript-eslint/parser": [".ts", ".tsx"]
427
},
5-
"extends": "@react-native-community",
6-
"parser": "@typescript-eslint/parser",
7-
"plugins": ["@typescript-eslint"],
8-
"rules": {
9-
"one-var": "off",
10-
"no-multi-assign": "off",
11-
"no-nested-ternary": "off",
12-
"no-undef": "off",
13-
"global-require": "off",
14-
15-
"import/no-extraneous-dependencies": "off",
16-
"import/first": "off",
17-
18-
"react-native/no-unused-styles": "error",
19-
"react-native/split-platform-components": "off",
20-
"react-native/no-raw-text": "off"
21-
},
22-
23-
"settings": {
24-
"import/extensions": [".js", ".ts", ".tsx"],
25-
"import/parsers": {
26-
"@typescript-eslint/parser": [".ts", ".tsx"]
27-
},
28-
"import/resolver": {
29-
"node": {
30-
"extensions": [".js", ".ts", ".tsx"]
31-
}
28+
"import/resolver": {
29+
"node": {
30+
"extensions": [".js", ".ts", ".tsx"]
3231
}
3332
}
34-
}
33+
}
34+
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@blueromans/react-native-ui-kit",
3-
"version": "0.0.6",
3+
"version": "0.0.7",
44
"description": "Ui kit for React Native",
55
"main": "lib/commonjs/index.js",
66
"module": "lib/module/index.js",

src/components/Button/Button.tsx

+8-8
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,13 @@ const Button = ({
9898
return (
9999
<View
100100
{...rest}
101-
style={
102-
[
103-
styles.button,
104-
compact && styles.compact,
105-
buttonStyle,
106-
style,
107-
] as ViewStyle
108-
}
101+
style={[
102+
styles.button,
103+
compact && styles.compact,
104+
buttonStyle,
105+
style,
106+
theme?.styles?.button?.content,
107+
]}
109108
>
110109
<TouchableHighlight
111110
borderless
@@ -149,6 +148,7 @@ const Button = ({
149148
uppercase && styles.uppercaseLabel,
150149
textStyle,
151150
labelStyle,
151+
theme?.styles?.button?.label,
152152
]}
153153
>
154154
{children}

src/components/Form/Input/TextInput.tsx

+7-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ const TextInput = ({
7272
return (
7373
<React.Fragment>
7474
<HelperText
75-
style={[labelStyle, { color: error ? errorColor : inputTextColor }]}
75+
style={[
76+
labelStyle,
77+
{ color: error ? errorColor : inputTextColor },
78+
theme?.styles?.input?.label,
79+
]}
7680
visible={label != null}
7781
>
7882
{label}
@@ -86,13 +90,14 @@ const TextInput = ({
8690
borderColor: hasActiveOutline ? activeColor : outlineColor,
8791
},
8892
containerStyle,
93+
theme?.styles?.input?.container,
8994
]}
9095
>
9196
<Controller
9297
control={control}
9398
render={({ field: { onChange, onBlur, value } }) => (
9499
<RnTextInput
95-
style={[styles.textInput, style]}
100+
style={[styles.textInput, style, theme?.styles?.input?.textInput]}
96101
placeholderTextColor={placeholderColor}
97102
onBlur={() => {
98103
setFocused(false);

src/styles/theme.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ export const AppTheme: Theme = {
2222
},
2323
fonts: getFonts(),
2424
baseHeight: BASE_HEIGHT,
25+
styles: {},
2526
};

src/types.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export type Theme = {
4949
colors?: Colors;
5050
fonts?: Fonts;
5151
baseHeight?: number;
52+
styles?: any;
5253
};
5354

5455
export type $Omit<T, K> = Pick<T, Exclude<keyof T, K>>;

0 commit comments

Comments
 (0)