ds-smart-ui
Version:
Smart UI is a React component library that helps you build accessible and responsive web applications.
31 lines (30 loc) • 1.14 kB
TypeScript
/**
* CardInfo component to display a label and a count with a status indicator.
* It is used to show summary information in a card format.
*
* @component
* @param {Object} props - Component properties.
* @param {string} props.label - The label to display in the card header.
* @param {number} props.count - The count to display in the card body.
* @param {"success" | "default" | "info" | "danger" | "warning"} props.status - The status of the card, which determines the color of the status indicator.
* @param {string} [props.id] - Optional ID for testing purposes.
* @returns {JSX.Element} The CardInfo component.
* * @example
* <CardInfo
* label="Total Users"
* count={150}
* status="success"
* id="total-users-card"
* />
* This component renders a card with a label, count, and a status indicator.
* The status indicator is a colored dot that reflects the status of the card.
*
*/
export interface CardInfoProps {
label: string;
count: number;
status: "success" | "default" | "info" | "danger" | "warning";
id?: string;
}
declare const CardInfo: React.FC<CardInfoProps>;
export default CardInfo;