Action, useful for creating simple actions like toolbar buttons.

Example

import {Action} from "@use-pico/client";

export const MyComponent = () => {
const mutation = useMutation();
return <Action
icon={{
enabled: "...",
disabled: "...",
loading: "...",
}}
loading={mutation.isPending}
onClick={() => {
mutation.mutate();
}}
/>
}

Index

Interfaces