import { FunctionalComponent, h } from "preact";
import { Project } from "../models/project";
import { getTimeUnit } from "../models/params";

export interface ProjectTimeUnitProps {
    project: Project
}

const ProjectTimeUnit: FunctionalComponent<ProjectTimeUnitProps> = ({ project }) => {
    const timeUnit = getTimeUnit(project);
    return (
       <abbr title={timeUnit.label}>{timeUnit.acronym}</abbr>
    );
};

export default ProjectTimeUnit;
