import React from 'react'; import { TrackMarginProps, MarginTickProps } from './types'; export function bestFontSize(height: number): number { if (height / 6 < 10) return (height < 10 ? height : 10); return height / 6; } const MarginTick: React.FC = ({ fontSize, position, width, children }) => ( <> {children} ); const TrackMargin: React.FC = props => { const fontSize = bestFontSize(50); return ( {props.shortLabel} { props.range && ( <> {props.range.min} {props.range.max} )} ); }; export default TrackMargin;