When something should run: once, on a repeat, or when a file arrives.
The live sentence under the controls is the point. A schedule assembled from five controls cannot be checked before saving, so this states it back in words - the cadence, the time, the zone as a CITY, and the next run. It is in an aria-live region so the confirmation reaches somebody who cannot see it change.
A one-off whose time has already passed says so rather than silently never running.
The note about approval steps is on by default: a person scheduling something unattended needs to know it will still stop and wait at every step marked "Asks you first".
import { SchedulePicker } from '@redrob-labs/ui';
| Prop | Type | Notes |
|---|---|---|
value |
ScheduleValue |
|
defaultValue |
ScheduleValue |
|
now |
Date |
The moment "next run" is computed against. Pass it in tests to keep the output stable. |
modes |
Array<[string, string]> |
[value, label] pairs. Defaults to once / repeats / on a new file. |
where |
string |
Where files arrive, for the event mode's sentence. |
locale |
string |
|
weekStart |
number |
|
zones |
Array<[string, string]> |
|
offices |
Array<[string, string]> | false |
|
label |
React.ReactNode |
|
dateLabel |
string |
|
repeatLabel |
string |
|
dayOfMonthLabel |
string |
|
timeLabel |
string |
|
zoneLabel |
string |
|
startLabel |
string |
|
note |
React.ReactNode | false |
false hides the line about approval steps. |
className |
string |
|
onChange |
(value: ScheduleValue) => void |