Logout Button
Simple and secure logout component that handles user session termination with proper error handling and callback support.
Quick Example
import { LogoutButton } from "@ovok/native";
import React from "react";
const LogoutExample = () => {
return <LogoutButton />;
};
export default LogoutExample;
Props
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
title | string | - | "settings.logout" translation | Custom button title |
onSuccess | () => void | - | - | Called when logout succeeds |
onError | (error: Error) => void | - | - | Called when logout fails |
onPress | () => void | - | - | Called before logout (optional) |
Inherits all SettingListItemProps except title which becomes optional
Localization
The component uses this translation key:
{
"settings": {
"logout": "Logout"
}
}
settings.logout- Default button title text
Related Components
- Delete Account Button - Permanent account deletion with confirmation
- Sign-In - User authentication components