style: clock period (#601)

* style: tweaks to studio override

* style: improvements to 12 hour format
This commit is contained in:
Carlos Valente
2023-11-20 09:53:35 +01:00
committed by GitHub
parent 2316bbebac
commit 1b55dbc170
16 changed files with 108 additions and 39 deletions
@@ -0,0 +1,23 @@
import { CSSProperties } from 'react';
import './SuperscriptTime.scss';
interface SuperscriptTimeProps {
time: string;
className?: string;
style?: CSSProperties;
}
export default function SuperscriptTime(props: SuperscriptTimeProps) {
const { time, className, style } = props;
// we assume anything after space is a period tag
const [timeString, period] = time.split(' ');
return (
<div className={className} style={style}>
{timeString}
{period && <sup className='period'>{period}</sup>}
</div>
);
}