UNPKG

856 BTypeScriptView Raw
1/**
2 * @fileOverview Rectangle
3 */
4import React, { SVGProps } from 'react';
5import { AnimationDuration, AnimationTiming } from '../util/types';
6export type RectRadius = [number, number, number, number];
7interface RectangleProps {
8 className?: string;
9 x?: number;
10 y?: number;
11 width?: number;
12 height?: number;
13 radius?: number | RectRadius;
14 isAnimationActive?: boolean;
15 isUpdateAnimationActive?: boolean;
16 animationBegin?: number;
17 animationDuration?: AnimationDuration;
18 animationEasing?: AnimationTiming;
19}
20export declare const isInRectangle: (point: {
21 x: number;
22 y: number;
23}, rect: {
24 x: number;
25 y: number;
26 width: number;
27 height: number;
28}) => boolean;
29export type Props = Omit<SVGProps<SVGPathElement>, 'radius'> & RectangleProps;
30export declare const Rectangle: React.FC<Props>;
31export {};