Skip to content

Commit f31986a

Browse files
authored
fixed types in the screen (#3079)
1 parent 2373454 commit f31986a

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

demo/src/screens/componentScreens/TextFieldScreen.tsx

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
import React, {Component} from 'react';
2-
import {StyleSheet, ScrollView, ActivityIndicator} from 'react-native';
3-
import {Colors, Spacings, View, Text, Button, Keyboard, TextField, TextFieldRef, SegmentedControl} from 'react-native-ui-lib';
2+
import {ScrollView, ActivityIndicator} from 'react-native';
3+
import {
4+
Colors,
5+
Spacings,
6+
View,
7+
Text,
8+
Button,
9+
Keyboard,
10+
TextField,
11+
TextFieldRef,
12+
FieldContextType,
13+
TextFieldProps,
14+
SegmentedControl
15+
} from 'react-native-ui-lib';
416
import Assets from '../../assets/Assets';
517
const {KeyboardAwareInsetsView} = Keyboard;
618
const priceFormatter = Intl.NumberFormat('en-US');
@@ -270,7 +282,7 @@ export default class TextFieldScreen extends Component {
270282
this.setState({preset: index === 0 ? 'underline' : 'outline'});
271283
};
272284

273-
getDynamicFieldStyle = (context, props) => {
285+
getDynamicFieldStyle = (context: FieldContextType, props: TextFieldProps) => {
274286
let color = Colors.$outlineNeutral;
275287

276288
if (context?.isFocused) {
@@ -420,17 +432,3 @@ export default class TextFieldScreen extends Component {
420432
);
421433
}
422434
}
423-
424-
const styles = StyleSheet.create({
425-
underline: {
426-
borderBottomWidth: 1,
427-
borderColor: Colors.cyan20,
428-
paddingBottom: 4
429-
},
430-
outline: {
431-
borderWidth: 1,
432-
borderColor: Colors.cyan20,
433-
padding: 4,
434-
borderRadius: 4
435-
}
436-
});

0 commit comments

Comments
 (0)