Action, useful for creating simple actions like toolbar buttons.
import {Action} from "@use-pico/client";export const MyComponent = () => { const mutation = useMutation(); return <Action icon={{ enabled: "...", disabled: "...", loading: "...", }} loading={mutation.isPending} onClick={() => { mutation.mutate(); }} />} Copy
import {Action} from "@use-pico/client";export const MyComponent = () => { const mutation = useMutation(); return <Action icon={{ enabled: "...", disabled: "...", loading: "...", }} loading={mutation.isPending} onClick={() => { mutation.mutate(); }} />}
Action, useful for creating simple actions like toolbar buttons.
Example