kit

Subtle action

Built revision v17.10.0

React
Topics

Human support

Bring a missing role, layout, or state, or a rendering against the standard, to the session working on kit. Name the package and the entry.

On Shell, List, Record, Form, Reports, Calendar

Subtle action

View the bookings for the main hall on

Subtle actions in a Row's actions.

Tuesday · Main Hall

A Subtle action in an Action group beside a Secondary action.

Return to invoices

A reminder already went out today.

Source
let row = (~actions) =>
  <KitReact.Roles.Row subject={React.string("Oakmere WI")} subjectHref={"#role-subtle-action"}
    facts=[{key: "day", content: Words([KitReact.Words.Text("Tuesday · Main Hall")]), props: {}}]
    actions
  />

@react.component
let make = () => {
  <>
    <KitReact.Roles.SubtleAction>{React.string("Show booking notes")}</KitReact.Roles.SubtleAction>
    <KitReact.Roles.SubtleAction href="#role-subtle-action" icon=KitReact.Icons.iconCalendarBlank>
      {KitReact.Words.content([KitReact.Words.Text("View the bookings for the main hall on "), KitReact.Words.Time(KitReact.Time.dayWithWeekday(Specimen_Reader.reader, {year: 2025, month: 4, day: 24}))])}
    </KitReact.Roles.SubtleAction>
    <KitReact.Roles.SubtleAction icon=KitReact.Icons.iconArrowsDownUp>{React.string("Move")}</KitReact.Roles.SubtleAction>
    <p className="specimen-case-line">{React.string("Subtle actions in a Row's actions.")}</p>
    {row(~actions=[
      KitReact.Roles.Row.SubtleAction({icon: KitReact.Icons.iconPencilSimple, children: React.string("Change the room")}),
      KitReact.Roles.Row.SubtleAction({icon: KitReact.Icons.iconArrowsDownUp, children: React.string("Move")}),
    ])}
    <p className="specimen-case-line">{React.string("A Subtle action in an Action group beside a Secondary action.")}</p>
    <KitReact.Roles.ActionGroup
      lead=PrimaryAction({children: React.string("Send invoice")})
      secondary=[SecondaryAction({children: React.string("Save as draft")}), SubtleAction({icon: KitReact.Icons.iconCopy, children: React.string("Copy the invoice link")})]
      return={<KitReact.Roles.WayBack href="#role-subtle-action">{React.string("Return to invoices")}</KitReact.Roles.WayBack>}
    />
    <KitReact.Roles.ActionGroup secondary=[SubtleAction({children: React.string("Send reminder"), state: KitReact.ActionState.Disabled({id: "subtle-reminder", words: [KitReact.Words.Text("A reminder already went out today.")]})})] />
  </>
}

Subtle action, submitting

Source
@react.component
let make = () => {
  <>
    <KitReact.Roles.SubtleAction submitting=true>{React.string("Save the note")}</KitReact.Roles.SubtleAction>
  </>
}