1
0
mirror of https://github.com/SomboChea/ui synced 2026-01-19 01:25:51 +07:00

fix: remove any types and added additional component state interfaces

This commit is contained in:
Griffithtp
2019-06-23 20:50:30 +01:00
parent 3c54b116c9
commit 116055c5d1
11 changed files with 22 additions and 21 deletions

View File

@@ -14,7 +14,7 @@ interface DetailContainerState {
tabPosition: number;
}
class DetailContainer extends Component<any, DetailContainerState> {
class DetailContainer<P> extends Component<P, DetailContainerState> {
public state = {
tabPosition: 0,
};
@@ -29,7 +29,7 @@ class DetailContainer extends Component<any, DetailContainerState> {
);
}
private handleChange = (event: any, tabPosition: number) => {
private handleChange = (event: React.ChangeEvent<{}>, tabPosition: number) => {
event.preventDefault();
this.setState({ tabPosition });
};