Open umairmanzoor1143 opened 1 year ago
codeSandBox: https://codesandbox.io/s/icon-picker-cfldkf?file=/src/App.js code: `import FontIconPicker from "@fonticonpicker/react-fonticonpicker"; import "@fonticonpicker/react-fonticonpicker/dist/fonticonpicker.base-theme.react.css"; import "@fonticonpicker/react-fonticonpicker/dist/fonticonpicker.material-theme.react.css"; import React, { useRef, useState } from "react";
const IconPicker = () => { const [icon, setIcon] = useState(); const fontIconPickerRef = useRef(null); const handleChange = (i) => { setIcon(i); };
const handleCustomClick = () => { if (fontIconPickerRef.current) { fontIconPickerRef.current.handleDropDown(true); } }; console.log(fontIconPickerRef); return (
); };
export default IconPicker; `
codeSandBox: https://codesandbox.io/s/icon-picker-cfldkf?file=/src/App.js code: `import FontIconPicker from "@fonticonpicker/react-fonticonpicker"; import "@fonticonpicker/react-fonticonpicker/dist/fonticonpicker.base-theme.react.css"; import "@fonticonpicker/react-fonticonpicker/dist/fonticonpicker.material-theme.react.css"; import React, { useRef, useState } from "react";
const IconPicker = () => { const [icon, setIcon] = useState(); const fontIconPickerRef = useRef(null); const handleChange = (i) => { setIcon(i); };
const handleCustomClick = () => { if (fontIconPickerRef.current) { fontIconPickerRef.current.handleDropDown(true); } }; console.log(fontIconPickerRef); return (
); };
export default IconPicker; `