Transaction deadline picker -- preset chips plus a custom minutes input,
the sibling of Web3.Ui.SlippageInput.
Web3.Ui.Deadline.view []
{ valueMinutes = model.deadlineMinutes
, onChange = DeadlineChanged
, presetsMinutes = [ 10, 20, 30 ]
}
-- At send time, turn minutes into the unix deadline the contract wants:
deadline =
Deadline.toUnixDeadline model.deadlineMinutes nowMillisCSS classes: web3-deadline, web3-deadline__chip,
web3-deadline__chip--active, web3-deadline__custom.
Unix timestamp (seconds) minutes from a Time.posixToMillis now.
Render the picker.
The root is the chip-plus-input group (
role="group"), because the component is a set of controls rather than a single one -- there is no one control anidwould belong on.