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

19 lines
376 B
TypeScript
Raw Normal View History

2019-08-09 10:26:22 +00:00
import React from "react";
2019-06-19 14:40:52 +00:00
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;