On Shell, Home, List, Record, Form, Stepped flow, Settings, Calendar, Issued document, Showcase
Primary action
An action can carry its label without an icon.
An action that opens another view is a link.
Edit billing contactAn action that cannot act yet is disabled, its reason beside it.
Add the hirer’s email before sending.
Source
@react.component
let make = () =>
<>
<KitReact.Roles.PrimaryAction icon=KitReact.Icons.iconArrowRight>
{React.string("Save changes")}
</KitReact.Roles.PrimaryAction>
<p>{React.string("An action can carry its label without an icon.")}</p>
<KitReact.Roles.PrimaryAction>{React.string("Save contact")}</KitReact.Roles.PrimaryAction>
<p>{React.string("An action that opens another view is a link.")}</p>
<KitReact.Roles.PrimaryAction href="#role-primary-action">
{React.string("Edit billing contact")}
</KitReact.Roles.PrimaryAction>
<p>{React.string("An action that cannot act yet is disabled, its reason beside it.")}</p>
<KitReact.Roles.ActionGroup lead=PrimaryAction({children: React.string("Send invoice"), state: KitReact.ActionState.Disabled({id: "send-invoice", words: [KitReact.Words.Text("Add the hirer’s email before sending.")]})}) />
</>
Primary action, submitting
Source
@react.component
let make = () =>
<>
<KitReact.Roles.PrimaryAction
icon=KitReact.Icons.iconArrowRight
submitting=true
>
{React.string("Save changes")}
</KitReact.Roles.PrimaryAction>
</>