UNPKG

1.28 kBTypeScriptView Raw
1import * as React from 'react';
2import type { DirectionType } from '../config-provider';
3import type { ProgressGradient, ProgressProps, StringGradients } from './progress';
4interface LineProps extends ProgressProps {
5 prefixCls: string;
6 direction?: DirectionType;
7 children: React.ReactNode;
8 strokeColor?: string | ProgressGradient;
9}
10/**
11 * @example
12 * {
13 * "0%": "#afc163",
14 * "75%": "#009900",
15 * "50%": "green", // ====> '#afc163 0%, #66FF00 25%, #00CC00 50%, #009900 75%, #ffffff 100%'
16 * "25%": "#66FF00",
17 * "100%": "#ffffff"
18 * }
19 */
20export declare const sortGradient: (gradients: StringGradients) => string;
21/**
22 * Then this man came to realize the truth: Besides six pence, there is the moon. Besides bread and
23 * butter, there is the bug. And... Besides women, there is the code.
24 *
25 * @example
26 * {
27 * "0%": "#afc163",
28 * "25%": "#66FF00",
29 * "50%": "#00CC00", // ====> linear-gradient(to right, #afc163 0%, #66FF00 25%,
30 * "75%": "#009900", // #00CC00 50%, #009900 75%, #ffffff 100%)
31 * "100%": "#ffffff"
32 * }
33 */
34export declare const handleGradient: (strokeColor: ProgressGradient, directionConfig?: DirectionType) => React.CSSProperties;
35declare const Line: React.FC<LineProps>;
36export default Line;