Skip to content

Commit 4100a9c

Browse files
authored
fix: max should be 359 (#260)
1 parent 62ecc1a commit 4100a9c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/ColorPicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export default forwardRef<HTMLDivElement, ColorPickerProps>((props, ref) => {
146146
type="hue"
147147
colors={HUE_COLORS}
148148
min={0}
149-
max={360}
149+
max={359}
150150
value={colorValue.getHue()}
151151
onChange={onHueChange}
152152
onChangeComplete={onHueChangeComplete}

tests/components.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ describe('ColorPicker.Components', () => {
4646
'.rc-color-picker-customize-alpha',
4747
);
4848

49-
expect(hueEle.textContent).toBe('0/360/215');
49+
expect(hueEle.textContent).toBe('0/359/215');
5050
expect(alphaEle.textContent).toBe('0/100/100');
5151

5252
// Change to trigger
5353
fireEvent.click(hueEle);
54-
expect(hueEle.textContent).toBe('0/360/33');
54+
expect(hueEle.textContent).toBe('0/359/33');
5555

5656
fireEvent.click(alphaEle);
5757
expect(alphaEle.textContent).toBe('0/100/33');

0 commit comments

Comments
 (0)