Migrate RatingButton from js to ts

Summary: Migrated RatingButton from RatingButton.js to RatingButton.tsx

Reviewed By: jknoxville

Differential Revision: D16732775

fbshipit-source-id: 380c8916f628115f474b575aef1b8a6e0c8863f9
This commit is contained in:
Benjamin Elo
2019-08-12 05:49:44 -07:00
committed by Facebook Github Bot
parent afe8ba65f0
commit 5c8be8f360
2 changed files with 8 additions and 8 deletions

View File

@@ -5,18 +5,18 @@
* @format
*/
import {Component, type Element, Fragment} from 'react';
import React, {Component, Fragment} from 'react';
import {Glyph, Tooltip} from 'flipper';
import {getInstance as getLogger} from '../fb-stubs/Logger.tsx';
import GK from '../fb-stubs/GK.tsx';
import {getInstance as getLogger} from '../fb-stubs/Logger';
import GK from '../fb-stubs/GK';
type Props = {
rating: ?number,
onRatingChanged: number => void,
rating: number | null | undefined;
onRatingChanged: (rating: number) => void;
};
type State = {
hoveredRating: ?number,
hoveredRating: number | null | undefined;
};
export default class RatingButton extends Component<Props, State> {
@@ -46,7 +46,7 @@ export default class RatingButton extends Component<Props, State> {
}
const stars = Array(5)
.fill(true)
.map<Element<*>>((_, index) => (
.map<JSX.Element>((_, index) => (
<div
key={index}
role="button"

View File

@@ -26,7 +26,7 @@ import {
LoadingIndicator,
} from 'flipper';
import {connect} from 'react-redux';
import RatingButton from './RatingButton.js';
import RatingButton from './RatingButton';
import DevicesButton from './DevicesButton';
import ScreenCaptureButtons from './ScreenCaptureButtons.js';
import AutoUpdateVersion from './AutoUpdateVersion';