Migrate IconButton to TypeScript

Summary: Migrated IconButton.js to IconButton.tsx

Reviewed By: danielbuechele

Differential Revision: D17132224

fbshipit-source-id: d4f14050385c7c25900e9a9d01f3b9a0dcff3a31
This commit is contained in:
Benjamin Elo
2019-09-02 03:54:48 -07:00
committed by Facebook Github Bot
parent a0696692e2
commit 36a8dfc1f6
3 changed files with 11 additions and 10 deletions

View File

@@ -5,7 +5,8 @@
* @format
*/
import {Glyph, styled, keyframes} from 'flipper';
import {Glyph, styled, keyframes, IconSize} from 'flipper';
import React from 'react';
const shrinkAnimation = keyframes({
'0%': {
@@ -16,13 +17,13 @@ const shrinkAnimation = keyframes({
},
});
type Props = {|
icon: string,
outline?: boolean,
onClick?: () => void,
color?: string,
size: 8 | 10 | 12 | 16 | 18 | 20 | 24 | 32,
|};
type Props = {
icon: string;
outline?: boolean;
onClick?: () => void;
color?: string;
size: IconSize;
};
const RippleEffect = styled('div')({
padding: 5,

View File

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