Merge pull request #12131 from awanlin/topic/custom-time-format-header-clocks

Added support for custom time format in header clocks
This commit is contained in:
Ben Lambert
2022-06-27 13:56:01 +02:00
committed by GitHub
11 changed files with 229 additions and 14 deletions
+10 -1
View File
@@ -49,10 +49,19 @@ const clockConfigs: ClockConfig[] = [
},
];
const timeFormat: Intl.DateTimeFormatOptions = {
hour: '2-digit',
minute: '2-digit',
hour12: false,
};
export const homePage = (
<Page themeId="home">
<Header title={<WelcomeTitle />} pageTitleOverride="Home">
<HeaderWorldClock clockConfigs={clockConfigs} />
<HeaderWorldClock
clockConfigs={clockConfigs}
customTimeFormat={timeFormat}
/>
</Header>
<Content>
<Grid container spacing={3}>