feat: expand utility widgets (#6638)
This commit is contained in:
1 parent
53b518960c
commit
58a24569ce
86 files changed
+7660
-751
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import { IconHourglass } from "@tabler/icons-react";
|
||||
|
||||
import { createWidgetDefinition } from "../definition";
|
||||
import { optionsBuilder } from "../options";
|
||||
import { getTimeZoneOptions } from "../clock/world-clock";
|
||||
|
||||
const maximumCountdownEvents = 20;
|
||||
|
||||
export const { definition, componentLoader } = createWidgetDefinition("countdown", {
|
||||
icon: IconHourglass,
|
||||
supportsAdvancedFocus: true,
|
||||
createOptions() {
|
||||
return optionsBuilder.from((factory) => ({
|
||||
events: factory.dateTimeEventList({
|
||||
defaultValue: [],
|
||||
maxValues: maximumCountdownEvents,
|
||||
timeZoneOptions: getTimeZoneOptions(),
|
||||
withDescription: true,
|
||||
}),
|
||||
showProgress: factory.switch({ defaultValue: true }),
|
||||
showSeconds: factory.switch({ defaultValue: false, withDescription: true }),
|
||||
}));
|
||||
},
|
||||
}).withDynamicImport(() => import("./component"));
|
||||
Reference in new issue
Block a user