Line.d.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import * as React from 'react';
  2. import type { DirectionType } from '../config-provider';
  3. import type { PercentPositionType, ProgressGradient, ProgressProps, StringGradients } from './progress';
  4. interface LineProps extends ProgressProps {
  5. prefixCls: string;
  6. direction?: DirectionType;
  7. strokeColor?: string | ProgressGradient;
  8. percentPosition: PercentPositionType;
  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. */
  20. export 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. */
  34. export declare const handleGradient: (strokeColor: ProgressGradient, directionConfig?: DirectionType) => React.CSSProperties;
  35. declare const Line: React.FC<LineProps>;
  36. export default Line;