import React from "react";
import NumberFormat from "react-number-format";

export default function CurrencyFormatter(props) {
  return (
    <NumberFormat
      thousandSeparator={true}
      decimalScale={2}
      fixedDecimalScale={true}
      prefix={"$"}
      value={props.children}
      displayType={"text"}
    />
  );
}
