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:
committed by
Facebook Github Bot
parent
afe8ba65f0
commit
5c8be8f360
@@ -5,18 +5,18 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Component, type Element, Fragment} from 'react';
|
import React, {Component, Fragment} from 'react';
|
||||||
import {Glyph, Tooltip} from 'flipper';
|
import {Glyph, Tooltip} from 'flipper';
|
||||||
import {getInstance as getLogger} from '../fb-stubs/Logger.tsx';
|
import {getInstance as getLogger} from '../fb-stubs/Logger';
|
||||||
import GK from '../fb-stubs/GK.tsx';
|
import GK from '../fb-stubs/GK';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
rating: ?number,
|
rating: number | null | undefined;
|
||||||
onRatingChanged: number => void,
|
onRatingChanged: (rating: number) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
type State = {
|
type State = {
|
||||||
hoveredRating: ?number,
|
hoveredRating: number | null | undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default class RatingButton extends Component<Props, State> {
|
export default class RatingButton extends Component<Props, State> {
|
||||||
@@ -46,7 +46,7 @@ export default class RatingButton extends Component<Props, State> {
|
|||||||
}
|
}
|
||||||
const stars = Array(5)
|
const stars = Array(5)
|
||||||
.fill(true)
|
.fill(true)
|
||||||
.map<Element<*>>((_, index) => (
|
.map<JSX.Element>((_, index) => (
|
||||||
<div
|
<div
|
||||||
key={index}
|
key={index}
|
||||||
role="button"
|
role="button"
|
||||||
@@ -26,7 +26,7 @@ import {
|
|||||||
LoadingIndicator,
|
LoadingIndicator,
|
||||||
} from 'flipper';
|
} from 'flipper';
|
||||||
import {connect} from 'react-redux';
|
import {connect} from 'react-redux';
|
||||||
import RatingButton from './RatingButton.js';
|
import RatingButton from './RatingButton';
|
||||||
import DevicesButton from './DevicesButton';
|
import DevicesButton from './DevicesButton';
|
||||||
import ScreenCaptureButtons from './ScreenCaptureButtons.js';
|
import ScreenCaptureButtons from './ScreenCaptureButtons.js';
|
||||||
import AutoUpdateVersion from './AutoUpdateVersion';
|
import AutoUpdateVersion from './AutoUpdateVersion';
|
||||||
|
|||||||
Reference in New Issue
Block a user