17 lines
451 B
TypeScript
17 lines
451 B
TypeScript
import React, { FunctionComponent } from "react";
|
|
import { Project } from "../types/project";
|
|
import { getTimeUnit } from "../types/params";
|
|
|
|
export interface ProjectTimeUnitProps {
|
|
project: Project
|
|
}
|
|
|
|
const ProjectTimeUnit: FunctionComponent<ProjectTimeUnitProps> = ({ project }) => {
|
|
const timeUnit = getTimeUnit(project);
|
|
return (
|
|
<abbr title={timeUnit.label}>{timeUnit.acronym}</abbr>
|
|
);
|
|
};
|
|
|
|
export default ProjectTimeUnit;
|