Skip to content

Commit bb450cb

Browse files
committed
Code format HintScreen
1 parent b43ea40 commit bb450cb

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

demo/src/screens/componentScreens/HintsScreen.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import React, {Component} from 'react';
33
import {Alert} from 'react-native';
44
import {Colors, View, Text, Hint, Button, RadioGroup, RadioButton, Switch} from 'react-native-ui-lib';
55

6-
76
const settingsIcon = require('../../assets/icons/settings.png');
87
const reactions = ['❤️', '😮', '😔', '😂', '😡'];
98

@@ -18,7 +17,7 @@ type HintScreenState = {
1817
useSideTip?: boolean;
1918
showCustomContent?: boolean;
2019
showReactionStrip?: boolean;
21-
enableShadow?: boolean
20+
enableShadow?: boolean;
2221
};
2322

2423
export default class HintsScreen extends Component<HintScreenProps, HintScreenState> {
@@ -47,11 +46,11 @@ export default class HintsScreen extends Component<HintScreenProps, HintScreenSt
4746

4847
onHintPressed = () => {
4948
Alert.alert('Hint Pressed');
50-
}
49+
};
5150

5251
onReactionPress = () => {
5352
Alert.alert('Reaction button pressed');
54-
}
53+
};
5554

5655
renderCustomContent() {
5756
return (
@@ -89,9 +88,9 @@ export default class HintsScreen extends Component<HintScreenProps, HintScreenSt
8988
enableShadow
9089
} = this.state;
9190
const targetFrame = {x: 140, y: 100, width: 10, height: 10};
92-
const message = useShortMessage ?
93-
'Add other cool and useful stuff.' :
94-
'Add other cool and useful stuff through adding apps to your visitors to enjoy.';
91+
const message = useShortMessage
92+
? 'Add other cool and useful stuff.'
93+
: 'Add other cool and useful stuff through adding apps to your visitors to enjoy.';
9594

9695
return (
9796
<View flex>
@@ -129,8 +128,11 @@ export default class HintsScreen extends Component<HintScreenProps, HintScreenSt
129128
// edgeMargins={30}
130129
// onBackgroundPress={() => this.setState({showHint: !showHint})}
131130
customContent={
132-
showCustomContent ?
133-
this.renderCustomContent() : showReactionStrip ? this.renderReactionStrip() : undefined
131+
showCustomContent
132+
? this.renderCustomContent()
133+
: showReactionStrip
134+
? this.renderReactionStrip()
135+
: undefined
134136
}
135137
color={!showCustomContent && showReactionStrip ? Colors.white : undefined}
136138
removePaddings={!showCustomContent && showReactionStrip}
@@ -220,8 +222,8 @@ export default class HintsScreen extends Component<HintScreenProps, HintScreenSt
220222
</View>
221223

222224
<View row centerV marginV-10>
223-
<Switch
224-
value={showReactionStrip}
225+
<Switch
226+
value={showReactionStrip}
225227
onValueChange={value => this.setState({showReactionStrip: value, enableShadow: true})}
226228
/>
227229
<Text marginL-10>Show reaction strip</Text>

0 commit comments

Comments
 (0)