saleor-dashboard/src/components/Percent/Percent.tsx
Paweł Chyła 52f58eb00a
Introduce datagrid on Discounts list (#3939)
Co-authored-by: wojteknowacki <wojciech.nowacki@saleor.io>
2023-07-19 15:31:13 +02:00

16 lines
375 B
TypeScript

import React from "react";
import { LocaleConsumer } from "../Locale";
import { formatPercantage } from "./utils";
interface PercentProps {
amount: number;
}
const Percent: React.FC<PercentProps> = ({ amount }) => (
<LocaleConsumer>
{({ locale }) => formatPercantage(amount, locale)}
</LocaleConsumer>
);
Percent.displayName = "Percent";
export default Percent;