@naarni/design-system
Version:
Naarni React Native Design System for EV Fleet Apps
47 lines • 1.09 kB
TypeScript
import { ReactNode } from 'react';
import { ViewStyle } from 'react-native';
export type AlertVariant = 'info' | 'success' | 'warning' | 'error';
export interface AlertAction {
label: string;
onPress: () => void;
variant?: 'primary' | 'secondary' | 'outline' | 'text' | 'ghost';
}
export interface AlertProps {
/**
* The variant of the alert
*/
variant?: AlertVariant;
/**
* The title of the alert
*/
title?: string;
/**
* The message content of the alert
*/
message: string;
/**
* Whether the alert can be dismissed
*/
dismissible?: boolean;
/**
* Whether the alert should persist (not auto-dismiss)
*/
persistent?: boolean;
/**
* Callback when the alert is dismissed
*/
onDismiss?: () => void;
/**
* Custom icon component
*/
icon?: ReactNode;
/**
* Additional styles for the alert container
*/
style?: ViewStyle;
/**
* Action buttons for the alert
*/
actions?: AlertAction[];
}
//# sourceMappingURL=interfaces.d.ts.map