Error in import statement
sahilxkhadka opened this issue · 1 comments
My Environment
| Dependency | "react": "^18.2.0",
"react-color-palette": "^6.2.0",
"react-dom": "^18.2.0" |
| --------------------------- | -------- |
| Node.JS version | 16.15.0 |
| react-color-palette version | v6.2.0 |
Expected Behavior:
No error in the import statement
Actual Behavior:
Error in the import statement
Additional Context:
The import statement has the following error:
Could not find a declaration file for module 'react-color-palette'. 'f:/ReactApps/profile-customizer/node_modules/react-color-palette/lib/index.mjs' implicitly has an 'any' type.
There are types at 'f:/ReactApps/profile-customizer/node_modules/react-color-palette/lib/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'react-color-palette' library may need to update its package.json or typings.
Here's my code:
import { ColorPicker, useColor } from "react-color-palette";
import "react-color-palette/lib/css/styles.css";
export const ColorInput = () => {
const [color, setColor] = useColor("hex", "#121212");
return (
<ColorPicker
width={240}
height={120}
color={color}
onChange={setColor}
hideHSV
hideRGB
hideHEX
/>
);
};
export default ColorInput;
Fixed in v7