saleor-dashboard/src/components/Weight/Weight.tsx

22 lines
408 B
TypeScript
Raw Normal View History

2019-08-09 10:26:22 +00:00
import React from "react";
import { FormattedMessage } from "react-intl";
2019-06-19 14:40:52 +00:00
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}
/>
);
2019-06-19 14:40:52 +00:00
Weight.displayName = "Weight";
export default Weight;