ZAO造

ApprovalGate

A host-owned request that becomes a sealed record when a person decides.

Preview

Su uses the Quiet instrument direction. Use the mode switcher above to see light and dark.

Remove 38 seatsREQ-2291
Seats
38 with no sign-in since Jul 15
Owners
6 get an email
Licenses
Return to the pool
Nothing changes until you approve.
Ink seal record
ApprovedYK · Oct 13 · 10:42
Azurite seal record
ApprovedYK · Oct 13 · 10:42
Ink seal record
DeclinedYK · Oct 13 · 10:44
Azurite seal record
DeclinedYK · Oct 13 · 10:44

Confirming a destructive approval

Hold. Press and hold the action with the pointer, Space or Enter.

Delete North workspaceREQ-2304
Members
14 lose access
Files
2,310 are deleted
This cannot be undone.

Press and hold to approve. Release to cancel.

Dialog. A press asks once more. A hold falls back to this with reduced motion.

Delete North workspaceREQ-2304
Members
14 lose access
Files
2,310 are deleted
This cannot be undone.

This component inherits Quiet instrument’s shared Su values. Its own styling is still open for study.

Usage

  • Use it when a consequential action needs an explicit approval or decline.
  • Keep title, facts, and note specific to the requested change. Nothing changes until the host accepts the callback and supplies a decision.
  • Pass mark for the approved record impression. The host owns the decision wording, person, and time.
  • Pending disables Decline and puts the Approve action into Button loading. A decision replaces the actions in place.

API

PropValuesDefault
title / labelsstring; request title and both action/result verbsrequired
markone or two charactersrequired
decisionnull | { kind, by, at }required
facts / note / referenceApprovalFact[] / ReactNode / string—
pending / disabledboolean / booleanfalse / false
onApprove / onDecline() => voidrequired

Example

import { ApprovalGate } from '@zao/react';

<ApprovalGate
  title="Remove 38 seats"
  approveLabel="Approve removal"
  approvedLabel="Approved removal"
  declineLabel="Decline"
  declinedLabel="Declined removal"
  mark="准"
  decision={decision}
  onApprove={approve}
  onDecline={decline}
/>

Accessibility

The component composes a passive Card and native Buttons. A decision record is a status region; focus moves from its action row to the record only when a decision replaces a focused action. The seal impression is decorative. Buttons retain their native keyboard and disabled behavior.