Migrated FavoriteButton to TypeScript

Summary: Migrated FavoriteButton.js to FavoriteButton.tsx

Reviewed By: danielbuechele

Differential Revision: D17132220

fbshipit-source-id: af1a3de4b272a57975486233f699e390677784fb
This commit is contained in:
Benjamin Elo
2019-09-02 03:54:48 -07:00
committed by Facebook Github Bot
parent 36a8dfc1f6
commit 4c68750058
2 changed files with 10 additions and 9 deletions

View File

@@ -5,14 +5,15 @@
* @format
*/
import {styled} from 'flipper';
import {IconButton} from './';
import {styled, IconSize, colors} from 'flipper';
import IconButton from './IconButton';
import React from 'react';
type Props = {|
onClick?: () => void,
highlighted: boolean,
size: 8 | 10 | 12 | 16 | 18 | 20 | 24 | 32,
|};
type Props = {
onClick?: () => void;
highlighted: boolean;
size: IconSize;
};
const FavoriteButtonContainer = styled('div')({
position: 'relative',
@@ -31,7 +32,7 @@ export default (props: Props) => {
{highlighted ? (
<IconButton
outline={false}
color="#FFD700"
color={colors.lemon}
icon="star"
{...iconButtonProps}
/>

View File

@@ -8,7 +8,7 @@
export {default as AutoCompleteSheet} from './AutoCompleteSheet';
export {default as BookmarksSidebar} from './BookmarksSidebar';
export {default as FavoriteButton} from './FavoriteButton';
export {default as FavoriteButton} from './FavoriteButton.tsx';
export {default as IconButton} from './IconButton.tsx';
export {default as NavigationInfoBox} from './NavigationInfoBox';
export {default as RequiredParametersDialog} from './RequiredParametersDialog';