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

19 lines
381 B
TypeScript
Raw Normal View History

2019-06-19 14:40:52 +00:00
import * as React from "react";
import i18n from "../../i18n";
export interface Weight {
unit: string;
value: number;
}
export interface WeightProps {
weight: Weight;
}
const Weight: React.StatelessComponent<WeightProps> = ({ weight }) =>
i18n.t("{{ value }} {{ unit }}", {
context: "weight",
...weight
});
Weight.displayName = "Weight";
export default Weight;