From 0e6ba5c4e2f1c9b94e923ca29fc90f1e2ce888ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20B=C3=BCchele?= Date: Wed, 11 Sep 2019 03:01:18 -0700 Subject: [PATCH] RatingButton Summary: _typescript_ Reviewed By: jknoxville Differential Revision: D17282354 fbshipit-source-id: 6d65a2735973cb46c133f2e38574d457e2aa484a --- src/chrome/RatingButton.tsx | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/chrome/RatingButton.tsx b/src/chrome/RatingButton.tsx index d3fa0166c..bc0dbab6f 100644 --- a/src/chrome/RatingButton.tsx +++ b/src/chrome/RatingButton.tsx @@ -72,6 +72,15 @@ const Row = styled(FlexRow)({ flexWrap: 'wrap', }); +type FeedbackComponentState = { + rating: number | null; + hoveredRating: number; + allowUserInfoSharing: boolean; + nextAction: NextAction; + predefinedComments: {[key: string]: boolean}; + comment: string; +}; + class FeedbackComponent extends Component< { submitRating: (rating: number) => void; @@ -84,16 +93,9 @@ class FeedbackComponent extends Component< close(): void; promptData: FeedbackPrompt; }, - { - rating: number | null; - hoveredRating: number; - allowUserInfoSharing: boolean; - nextAction: NextAction; - predefinedComments: {[key: string]: boolean}; - comment: string; - } + FeedbackComponentState > { - state = { + state: FeedbackComponentState = { rating: null, hoveredRating: 0, allowUserInfoSharing: true,