Skip to content
This repository was archived by the owner on Nov 3, 2025. It is now read-only.

Commit 5bb7b76

Browse files
committed
🎨 (example) fix eslint errors
1 parent eeef827 commit 5bb7b76

5 files changed

Lines changed: 32 additions & 38 deletions

File tree

example/src/App.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import React, { Component } from 'react';
22
import { SignIn } from './canals/SignIn';
33
import { FullScreenPortal } from 'react-gondola';
44

5-
interface IProps {}
6-
export default class App extends Component<IProps> {
5+
export default class App extends Component<{}> {
76
render() {
87
return (
98
<FullScreenPortal>

example/src/canals/SignIn/Confirm.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import React, { Component } from 'react';
22
import { SignIn } from './SignIn';
33

4-
interface IProps {}
5-
export class Confirm extends Component<IProps> {
4+
export class Confirm extends Component<{}> {
65
render() {
76
return <SignIn />;
87
}

example/src/canals/SignIn/FirstName.tsx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
import React, { Component } from 'react';
22
import { StyleSheet, Text, View, Button, TextInput } from 'react-native';
33

4-
interface IProps {
4+
interface Props {
55
onNext: () => any;
66
}
7-
export class FirstName extends Component<IProps> {
7+
8+
const styles = StyleSheet.create({
9+
container: {
10+
alignItems: 'center',
11+
backgroundColor: '#FFAAAA',
12+
flex: 1,
13+
justifyContent: 'space-around',
14+
},
15+
});
16+
17+
export class FirstName extends Component<Props> {
818
render() {
919
return (
1020
<View style={styles.container}>
@@ -15,12 +25,3 @@ export class FirstName extends Component<IProps> {
1525
);
1626
}
1727
}
18-
19-
const styles = StyleSheet.create({
20-
container: {
21-
alignItems: 'center',
22-
backgroundColor: '#FFAAAA',
23-
flex: 1,
24-
justifyContent: 'space-around'
25-
}
26-
});

example/src/canals/SignIn/LastName.tsx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
import React, { Component } from 'react';
22
import { StyleSheet, Text, View, Button } from 'react-native';
33

4-
interface IProps {
4+
interface Props {
55
onNext: () => any;
66
}
7-
export class LastName extends Component<IProps> {
7+
8+
const styles = StyleSheet.create({
9+
container: {
10+
alignItems: 'center',
11+
backgroundColor: '#FF9999',
12+
flex: 1,
13+
justifyContent: 'center',
14+
},
15+
});
16+
17+
export class LastName extends Component<Props> {
818
render() {
919
return (
1020
<View style={styles.container}>
@@ -14,12 +24,3 @@ export class LastName extends Component<IProps> {
1424
);
1525
}
1626
}
17-
18-
const styles = StyleSheet.create({
19-
container: {
20-
alignItems: 'center',
21-
backgroundColor: '#FF9999',
22-
flex: 1,
23-
justifyContent: 'center'
24-
}
25-
});

example/src/canals/SignIn/SignIn.tsx

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Confirm } from './Confirm';
88
export class SignIn extends Component {
99
state = {
1010
confirm: false,
11-
lastName: false
11+
lastName: false,
1212
};
1313

1414
goForward = () => {
@@ -29,32 +29,26 @@ export class SignIn extends Component {
2929
{
3030
Component: FirstName,
3131
name: 'firstName',
32-
props: { onNext: this.goForward }
32+
props: { onNext: this.goForward },
3333
},
3434
{
3535
Component: LastName,
3636
Transitioner: RotateCrazy,
3737
name: 'lastName',
3838
onBack: this.goBackward,
39-
props: { onNext: this.goForward }
39+
props: { onNext: this.goForward },
4040
},
4141
{
4242
Component: Confirm,
4343
Transitioner: RotateCrazy,
4444
name: 'confirm',
45-
onBack: this.goBackward
46-
}
45+
onBack: this.goBackward,
46+
},
4747
]);
4848

4949
render() {
5050
const { SignInCanal } = this;
5151

52-
return (
53-
<SignInCanal
54-
firstName
55-
lastName={this.state.lastName}
56-
confirm={this.state.confirm}
57-
/>
58-
);
52+
return <SignInCanal firstName lastName={this.state.lastName} confirm={this.state.confirm} />;
5953
}
6054
}

0 commit comments

Comments
 (0)