Skip to content

Commit

Permalink
fix: max should be 359 (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ authored Jul 20, 2024
1 parent 62ecc1a commit 4100a9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ColorPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export default forwardRef<HTMLDivElement, ColorPickerProps>((props, ref) => {
type="hue"
colors={HUE_COLORS}
min={0}
max={360}
max={359}
value={colorValue.getHue()}
onChange={onHueChange}
onChangeComplete={onHueChangeComplete}
Expand Down
4 changes: 2 additions & 2 deletions tests/components.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ describe('ColorPicker.Components', () => {
'.rc-color-picker-customize-alpha',
);

expect(hueEle.textContent).toBe('0/360/215');
expect(hueEle.textContent).toBe('0/359/215');
expect(alphaEle.textContent).toBe('0/100/100');

// Change to trigger
fireEvent.click(hueEle);
expect(hueEle.textContent).toBe('0/360/33');
expect(hueEle.textContent).toBe('0/359/33');

fireEvent.click(alphaEle);
expect(alphaEle.textContent).toBe('0/100/33');
Expand Down

0 comments on commit 4100a9c

Please sign in to comment.