buttonHelpers.d.ts 1.4 KB

123456789101112131415161718
  1. import React from 'react';
  2. import type { BaseButtonProps, LegacyButtonType } from './button';
  3. export declare const isTwoCNChar: (string: string) => boolean;
  4. export declare function convertLegacyProps(type?: LegacyButtonType): Pick<BaseButtonProps, 'danger' | 'type'>;
  5. export declare function isString(str: unknown): str is string;
  6. export declare function isUnBorderedButtonVariant(type?: ButtonVariantType): type is "text" | "link";
  7. export declare function spaceChildren(children: React.ReactNode, needInserted: boolean): (number | React.JSX.Element)[] | null | undefined;
  8. declare const _ButtonTypes: readonly ["default", "primary", "dashed", "link", "text"];
  9. export type ButtonType = (typeof _ButtonTypes)[number];
  10. declare const _ButtonShapes: readonly ["default", "circle", "round"];
  11. export type ButtonShape = (typeof _ButtonShapes)[number];
  12. declare const _ButtonHTMLTypes: readonly ["submit", "button", "reset"];
  13. export type ButtonHTMLType = (typeof _ButtonHTMLTypes)[number];
  14. export declare const _ButtonVariantTypes: readonly ["outlined", "dashed", "solid", "filled", "text", "link"];
  15. export type ButtonVariantType = (typeof _ButtonVariantTypes)[number];
  16. export declare const _ButtonColorTypes: readonly ["default", "primary", "danger", "blue", "purple", "cyan", "green", "magenta", "pink", "red", "orange", "yellow", "volcano", "geekblue", "lime", "gold"];
  17. export type ButtonColorType = (typeof _ButtonColorTypes)[number];
  18. export {};