UNPKG

react-bezier-curve-editor

Version:
39 lines (38 loc) 1.57 kB
import type { ExpandedValueType, ValueType } from "../../types"; export interface Point { x: number; y: number; } interface BezierCurveEditorBaseProps { size?: number; outerAreaSize?: number; outerAreaColor?: string; innerAreaColor?: string; strokeWidth?: number; rowColor?: string; fixedHandleColor?: string; curveLineColor?: string; handleLineColor?: string; startHandleColor?: string; endHandleColor?: string; className?: string; fixedPointActiveClassName?: string; startHandleClassName?: string; startHandleActiveClassName?: string; endHandleClassName?: string; endHandleActiveClassName?: string; enablePreview?: boolean; } interface BezierCurveEditorEditNodeProps { allowNodeEditing: true; value?: ExpandedValueType; onChange?: (value: ExpandedValueType) => void; } interface BezierCurveEditorFixedNodeProps { allowNodeEditing?: false; value?: ValueType; onChange?: (value: ValueType) => void; } export type BezierCurveEditorProps = BezierCurveEditorBaseProps & (BezierCurveEditorEditNodeProps | BezierCurveEditorFixedNodeProps); export declare function BezierCurveEditor({ size, strokeWidth, outerAreaSize, value: valueProp, innerAreaColor, outerAreaColor, rowColor, handleLineColor, curveLineColor, fixedHandleColor, startHandleColor, endHandleColor, enablePreview, className, startHandleClassName, endHandleClassName, fixedPointActiveClassName, startHandleActiveClassName, endHandleActiveClassName, ...props }: BezierCurveEditorProps): JSX.Element; export {};