saleor-dashboard/src/components/Weight/Weight.tsx
2019-11-07 12:34:54 +01:00

21 lines
408 B
TypeScript

import React from "react";
import { FormattedMessage } from "react-intl";
export interface Weight {
unit: string;
value: number;
}
export interface WeightProps {
weight: Weight;
}
const Weight: React.FC<WeightProps> = ({ weight }) => (
<FormattedMessage
defaultMessage="{value} {unit}"
description="weight"
values={weight}
/>
);
Weight.displayName = "Weight";
export default Weight;