2019-08-09 10:26:22 +00:00
|
|
|
import React from "react";
|
2019-08-26 21:54:03 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2019-11-07 11:34:54 +00:00
|
|
|
const Weight: React.FC<WeightProps> = ({ weight }) => (
|
2019-08-26 21:54:03 +00:00
|
|
|
<FormattedMessage
|
|
|
|
defaultMessage="{value} {unit}"
|
|
|
|
description="weight"
|
|
|
|
values={weight}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
|
2019-06-19 14:40:52 +00:00
|
|
|
Weight.displayName = "Weight";
|
|
|
|
export default Weight;
|