Clock
Navigation & Chrome

Clock

Styled span for displaying the current time, intended for use inside a TopBar. No custom props; wraps any children.

Props

Clock extends HTMLAttributes<HTMLSpanElement> with no additional custom props. It renders as a <span> with the clock typography styling applied. You pass in the time string as children.

Examples

08:17:36 AM
Clock
ImportTSX
import { Clock } from "@solarius/onset";

// Inside a TopBar:
<TopBarIconButton icon={<IconBell size={15} />} aria-label="Notifications" />
<Clock>{time}</Clock>