All files / libs/reporting/dashboards/components/src/lib/home-legacy/earnings-card EarningsCardCurrency.tsx

100% Statements 4/4
100% Branches 0/0
100% Functions 2/2
100% Lines 4/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32                      15x 8x   8x       8x                          
import { css } from '@emotion/react';
import { memo } from 'react';
 
import { Group } from '@allshares/studio-design-system';
import { type CurrencySymbolsEnum } from '@amalia/ext/iso-4217';
import { useCurrencySymbolCharacters } from '@amalia/kernel/intl/components';
 
interface EarningsCardCurrencyProps {
  readonly symbol: CurrencySymbolsEnum;
}
 
export const EarningsCardCurrency = memo(function EarningsCardCurrency({ symbol }: EarningsCardCurrencyProps) {
  const currencySymbolCharacters = useCurrencySymbolCharacters(symbol);
 
  return (
    <Group
      align="center"
      justify="center"
      css={(theme) => css`
        height: 30px;
        min-width: 30px;
        width: auto;
        border-radius: ${theme.ds.borderRadiuses.round};
        color: ${theme.ds.colors.gray[0]};
        background-color: ${theme.ds.colors.primary[400]};
      `}
    >
      {currencySymbolCharacters}
    </Group>
  );
});