ds-smart-ui
Version:
Smart UI v1.0.5 — A production-ready React component library by PT Praisindo Teknologi. Covers inputs, navigation, data display, feedback, and layout with a unified design system, semantic Typography tokens, and full Storybook documentation.
33 lines (32 loc) • 1.28 kB
TypeScript
/**
* IconPicker component to select icons from a predefined SVG file.
* It supports searching icons, selecting an icon, and closing the picker.
* @component
* @param {Object} props - Component properties.
* @param {boolean} props.open - Whether the icon picker is open.
* @param {function} props.onClose - Callback function to close the icon picker.
* @param {function} props.onSelect - Callback function to select an icon.
* @param {string} [props.svgFile] - Name of the SVG file containing icons (default: "material-outline").
* @param {string} [props.assetPath] - Path to the SVG file (default: "/assets/icons/").
* @param {string} [props.id] - Optional ID for testing purposes.
* @returns {JSX.Element|null} The IconPicker component or null if not open.
* @example
* <IconPicker
* open={true}
* onClose={() => console.log("Picker closed")}
* onSelect={(iconName) => console.log("Selected icon:", iconName)}
* svgFile="material-outline"
* assetPath="/assets/icons/"
* id="icon-picker"
* />
*/
interface IconPickerProps {
open: boolean;
onClose: () => void;
onSelect: (iconName: string) => void;
svgFile?: string;
assetPath?: string;
id?: string;
}
declare const IconPicker: React.FC<IconPickerProps>;
export default IconPicker;