index.d.ts 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import type { CSSProperties } from 'react';
  2. import type { FullToken, GlobalToken } from '../../theme/internal';
  3. export interface ComponentToken {
  4. /**
  5. * @desc 选择器宽度
  6. * @descEN Width of Cascader
  7. */
  8. controlWidth: number | string;
  9. /**
  10. * @desc 选项宽度
  11. * @descEN Width of item
  12. */
  13. controlItemWidth: number | string;
  14. /**
  15. * @desc 下拉菜单高度
  16. * @descEN Height of dropdown
  17. */
  18. dropdownHeight: number | string;
  19. /**
  20. * @desc 选项选中时背景色
  21. * @descEN Background color of selected item
  22. */
  23. optionSelectedBg: string;
  24. /**
  25. * @desc 选项选中时文本颜色
  26. * @descEN Text color when option is selected
  27. */
  28. optionSelectedColor: string;
  29. /**
  30. * @desc 选项选中时字重
  31. * @descEN Font weight of selected item
  32. */
  33. optionSelectedFontWeight: CSSProperties['fontWeight'];
  34. /**
  35. * @desc 选项内间距
  36. * @descEN Padding of menu item
  37. */
  38. optionPadding: CSSProperties['padding'];
  39. /**
  40. * @desc 选项菜单(单列)内间距
  41. * @descEN Padding of menu item (single column)
  42. */
  43. menuPadding: CSSProperties['padding'];
  44. }
  45. export type CascaderToken = FullToken<'Cascader'>;
  46. export declare const prepareComponentToken: (token: GlobalToken) => {
  47. controlWidth: number;
  48. controlItemWidth: number;
  49. dropdownHeight: number;
  50. optionSelectedBg: string;
  51. optionSelectedFontWeight: number;
  52. optionPadding: string;
  53. menuPadding: number;
  54. optionSelectedColor: string;
  55. };
  56. declare const _default: (prefixCls: string, rootCls?: string) => readonly [(node: React.ReactElement) => React.ReactElement, string, string];
  57. export default _default;