@pagamio/frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
31 lines (30 loc) • 1 kB
TypeScript
/**
* Props for LogoutButton component
*/
interface LogoutButtonProps {
/** Additional class names to apply to the button */
className?: string;
/** Button variant from the UI component library */
variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
/** Callback function called after successful logout */
onLogoutSuccess?: () => void;
/** Callback function called when logout fails */
onLogoutError?: (error: Error) => void;
}
/**
* LogoutButton Component
*
* A reusable button component that handles user logout with loading state
* and error handling.
*
* @example
* ```tsx
* <LogoutButton
* variant="destructive"
* onLogoutSuccess={() => navigate('/login')}
* onLogoutError={(error) => console.error('Logout failed:', error)}
* />
* ```
*/
declare const LogoutButton: ({ className, variant, onLogoutSuccess, onLogoutError }: LogoutButtonProps) => import("react/jsx-runtime").JSX.Element;
export default LogoutButton;