Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate currency-wrapper to ts #17

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Text } from '@deriv/components';

const CurrencyWrapper = ({ currency }) => (
type TCurrencyWrapper = {
currency: string;
};

const CurrencyWrapper = ({ currency }: TCurrencyWrapper) => (
<div className='currency__wrapper'>
<Text color='colored-background' weight='bold' size='xxxs'>
{currency}
</Text>
</div>
);

CurrencyWrapper.propTypes = {
currency: PropTypes.string,
};

export default CurrencyWrapper;
2 changes: 1 addition & 1 deletion packages/reports/src/Constants/data-table-constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { getProfitOrLoss } from '../Helpers/profit-loss';
import IndicativeCell from '../Components/indicative-cell.jsx';
import MarketSymbolIconRow from '../Components/market-symbol-icon-row.jsx';
import ProfitLossCell from '../Components/profit_loss_cell.jsx';
import CurrencyWrapper from '../Components/currency-wrapper.jsx';
import CurrencyWrapper from '../Components/currency-wrapper';

const getModeFromValue = key => {
const map = {
Expand Down