LogoutButton
Single-shot logout button. Calls AuthClient.logoutCurrent() and surfaces in-flight + error state from the underlying action hook. Disabled while pending to prevent double-submits.
Usage
import { LogoutButton } from '@rw3iss/auth-client/preact/atoms';
<LogoutButton onComplete={() => navigate("/login")}/>Props
| Name | Type | Description |
|---|---|---|
client | AuthClient | |
label | string | Override the button label. Default “Sign out”. |
onComplete | () => void | Called after a successful logout. |
className | string | Extra className. |
variant | 'primary' | 'ghost' | 'danger' | style variant — “primary” | “ghost” | “danger”. Default “ghost”. |