UNPKG

ds-smart-ui

Version:

Smart UI is a React component library that helps you build accessible and responsive web applications.

25 lines (24 loc) 1.85 kB
/** * Icon component to display various icons based on the provided name. * It supports different sizes and optional class names and IDs. * @component * @param {Object} props - Component properties. * @param {("success" | "danger" | "warning" | "pinFailed" | "pinSuccess" | "resetPassFailed" | "resetPassSuccess" | "verifFailed" | "verifSuccess" | "dataDone" | "emailSent" | "emptyFile" | "emptyPortfolio" | "emptyProduct" | "emptySearch" | "emptyTransaction" | "emptyNews" | "idRegistered" | "limit" | "mobileSent" | "noInternet" | "paperDestroyer" | "somethingWrong" | "underMaintenance" | "unknownImage" | "bankingProduct" | "bonds" | "forex" | "mld" | "mutualFund")} props.name - Name of the icon to display. * @param {number} [props.size=50] - Size of the icon in pixels (default is 50). * @param {string} [props.className=""] - Additional CSS classes for customization. * @param {string} [props.id] - Optional ID for testing purposes. * @returns {JSX.Element} The Icon component. * @example * <Icon name="success" size={40} className="custom-icon" id="icon-success" /> * This component renders an image of the specified icon with the given size and optional class name and ID. * @example * <Icon name="danger" /> */ interface IconProps { name: "success" | "danger" | "warning" | "pinFailed" | "pinSuccess" | "resetPassFailed" | "resetPassSuccess" | "verifFailed" | "verifSuccess" | "dataDone" | "emailSent" | "emptyFile" | "emptyPortfolio" | "emptyProduct" | "emptySearch" | "emptyTransaction" | "emptyNews" | "idRegistered" | "limit" | "mobileSent" | "noInternet" | "paperDestroyer" | "somethingWrong" | "underMaintenance" | "unknownImage" | "bankingProduct" | "bonds" | "forex" | "mld" | "mutualFund"; size?: number; className?: string; id?: string; } declare const Icon: React.FC<IconProps>; export default Icon;