Skip to content

Commit

Permalink
Merge pull request Expensify#33243 from pasyukevich/feature/migrate-C…
Browse files Browse the repository at this point in the history
…urrencySymbolButton

[TS migration] Migrate 'CurrencySymbolButton.js' component to TypeScript
  • Loading branch information
rlinoz authored Jan 3, 2024
2 parents 3826e5d + e428b68 commit 273fa79
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import PropTypes from 'prop-types';
import React from 'react';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
Expand All @@ -7,15 +6,15 @@ import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback';
import Text from './Text';
import Tooltip from './Tooltip';

const propTypes = {
type CurrencySymbolButtonProps = {
/** Currency symbol of selected currency */
currencySymbol: PropTypes.string.isRequired,
currencySymbol: string;

/** Function to call when currency button is pressed */
onCurrencyButtonPress: PropTypes.func.isRequired,
onCurrencyButtonPress: () => void;
};

function CurrencySymbolButton({onCurrencyButtonPress, currencySymbol}) {
function CurrencySymbolButton({onCurrencyButtonPress, currencySymbol}: CurrencySymbolButtonProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();
return (
Expand All @@ -31,7 +30,6 @@ function CurrencySymbolButton({onCurrencyButtonPress, currencySymbol}) {
);
}

CurrencySymbolButton.propTypes = propTypes;
CurrencySymbolButton.displayName = 'CurrencySymbolButton';

export default CurrencySymbolButton;

0 comments on commit 273fa79

Please sign in to comment.