diff --git a/src/chrome/SelectPluginSheet.js b/src/chrome/SelectPluginSheet.tsx similarity index 79% rename from src/chrome/SelectPluginSheet.js rename to src/chrome/SelectPluginSheet.tsx index b8396b69d..30f4559e9 100644 --- a/src/chrome/SelectPluginSheet.js +++ b/src/chrome/SelectPluginSheet.tsx @@ -6,7 +6,6 @@ */ import { - Component, Text, FlexColumn, styled, @@ -17,21 +16,22 @@ import { colors, View, } from 'flipper'; +import React, {Component} from 'react'; export type PluginSelection = Map; -type Props = {| - onSelect: (plugins: Array) => void, - onHide: () => mixed, - plugins: PluginSelection, -|}; +type Props = { + onSelect: (plugins: Array) => void; + onHide: () => any; + plugins: PluginSelection; +}; const Title = styled(Text)({ margin: 6, }); type State = { - plugins: PluginSelection, + plugins: PluginSelection; }; const Container = styled(FlexColumn)({ @@ -64,9 +64,9 @@ const Padder = styled('div')( ); type PluginRowComponentProps = { - name: string, - selected: boolean, - onChange: (name: string, selected: boolean) => void, + name: string; + selected: boolean; + onChange: (name: string, selected: boolean) => void; }; class PluginRowComponent extends Component { @@ -97,7 +97,7 @@ class PluginRowComponent extends Component { } export default class SelectPluginSheet extends Component { - state = {plugins: new Map()}; + state = {plugins: new Map()}; static getDerivedStateFromProps(props: Props, state: State) { if (state.plugins.size > 0) { return null; @@ -128,20 +128,18 @@ export default class SelectPluginSheet extends Component { Select the plugins for which you want to export the data - {Array.from(plugins.entries()).map( - ([pluginID: string, selected: boolean]) => { - return ( - { - plugins.set(id, selected); - this.setState({plugins}); - }} - /> - ); - }, - )} + {Array.from(plugins.entries()).map(([pluginID, selected]) => { + return ( + { + plugins.set(id, selected); + this.setState({plugins}); + }} + /> + ); + })}