ModusCreateOrg/budgeting

View on GitHub
app/components/Legend/LegendItem.js

Summary

Maintainability
A
0 mins
Test Coverage
// @flow
import * as React from 'react';
import formatAmount from 'utils/formatAmount';
import styles from './styles.scss';

type LegendItemProps = {
  color: string,
  value: number,
  label: string,
};

const LegendItem = ({ color, label, value }: LegendItemProps) => (
  <li style={{ color }}>
    <span>{label}</span>
    <span className={styles.value}> {formatAmount(value).text} </span>
  </li>
);

export default LegendItem;