@cometchat/chat-uikit-react-native
Version:
Ready-to-use Chat UI Components for React Native
47 lines (46 loc) • 1.48 kB
TypeScript
/**
* @file Skeleton.tsx
* @description
* Shimmer / skeleton loading component for the **Call Logs** list in CometChat UIKit.
* It renders a column of 20 placeholder rows that mimic an avatar, name, subtitle and a
* trailing action icon. A diagonal animated gradient (“shimmer”) sweeps across the rows
* to hint that data is loading.
*
* The component is completely theme-aware and can be customised via the `style` prop
* or by tweaking the UIKit theme’s `callLogsStyles.skeletonStyle` object.
*
*/
import React from "react";
import { CometChatTheme } from "../../theme/type";
/**
* Shape of the style object accepted by this component.
* It is taken straight from the UIKit theme definition so that consumers
* may override only the bits they need.
*/
type SkeletonStyle = CometChatTheme["callLogsStyles"]["skeletonStyle"];
interface SkeletonProps {
/**
* Per-instance style overrides. **All keys are optional**; any missing keys
* fall back to the values provided by the current CometChat theme.
*/
style?: Partial<SkeletonStyle>;
}
/**
* Animated shimmer skeleton for the Call Logs list.
*
* @param props.style – Partial style overrides.
*
* @example
* ```tsx
* <Skeleton
* style={{
* linearGradientColors: ["#E8E8E8", "#F5F5F5"],
* shimmerBackgroundColor: "#FFFFFF",
* shimmerOpacity: 0.12,
* speed: 2,
* }}
* />
* ```
*/
export declare const Skeleton: React.FC<SkeletonProps>;
export {};