casesandberg / casesandberg/react-color

Some prop types of Saturation are not exported

Open
#831 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.3k
Forks
920
PR merge metrics
No merged PRs in 30d

Description

I tried to import Saturation in my React-Typescript project and use it like below:

```typescriptscript
import { Saturation } from 'react-color/lib/components/common';

const Component: React.FC = () => {
return (

);
};
```

VSCode suggests I missed Color prop and hsl and hsv were not needed. I tried to include Color and remove hsl and hsv. It didn't work. And I know the code above was correct because it worked and I checked source code of Saturation as well.

Contributor guide

Open the contributing guide

Research direction

Start at the Saturation component and its import entry point, react-color/lib/components/common, then inspect how its prop types are declared and exported. Confirm that the documented onChange, hsl, and hsv usage type-checks without requiring an unrelated Color prop.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.