修复 bug
This commit is contained in:
@@ -4,6 +4,8 @@ export function CyanSlider({
|
||||
max,
|
||||
step = 1,
|
||||
onChange,
|
||||
onInteractionStart,
|
||||
onInteractionEnd,
|
||||
disabled = false,
|
||||
}: {
|
||||
value: number;
|
||||
@@ -11,6 +13,8 @@ export function CyanSlider({
|
||||
max: number;
|
||||
step?: number;
|
||||
onChange: (v: number) => void;
|
||||
onInteractionStart?: () => void;
|
||||
onInteractionEnd?: () => void;
|
||||
disabled?: boolean;
|
||||
}) {
|
||||
const fillPct = Math.max(
|
||||
@@ -39,6 +43,11 @@ export function CyanSlider({
|
||||
value={value}
|
||||
className="cyan-slider relative z-10"
|
||||
disabled={disabled}
|
||||
onPointerDown={() => onInteractionStart?.()}
|
||||
onFocus={() => onInteractionStart?.()}
|
||||
onPointerUp={() => onInteractionEnd?.()}
|
||||
onPointerCancel={() => onInteractionEnd?.()}
|
||||
onBlur={() => onInteractionEnd?.()}
|
||||
onChange={(e) => onChange(Number(e.target.value))}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user