props.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import type { ClIconProps } from "../cl-icon/props";
  2. import type { ClButtonType, Size } from "../../types";
  3. import type { ClLoadingProps } from "../cl-loading/props";
  4. import type { ClTextProps } from "../cl-text/props";
  5. export type ClButtonPassThrough = {
  6. className?: string;
  7. label?: ClTextProps;
  8. icon?: ClIconProps;
  9. loading?: ClLoadingProps;
  10. };
  11. export type ClButtonProps = {
  12. className?: string;
  13. pt?: ClButtonPassThrough;
  14. type?: ClButtonType;
  15. color?: string;
  16. icon?: string;
  17. text?: boolean;
  18. rounded?: boolean;
  19. border?: boolean;
  20. loading?: boolean;
  21. disabled?: boolean;
  22. size?: Size;
  23. hoverClass?: string;
  24. hoverStopPropagation?: boolean;
  25. hoverStartTime?: number;
  26. hoverStayTime?: number;
  27. formType?: "submit" | "reset";
  28. openType?: "agreePrivacyAuthorization" | "feedback" | "share" | "getUserInfo" | "contact" | "getPhoneNumber" | "launchApp" | "openSetting" | "chooseAvatar" | "getAuthorize" | "lifestyle" | "contactShare" | "openGroupProfile" | "openGuildProfile" | "openPublicProfile" | "shareMessageToFriend" | "addFriend" | "addColorSign" | "addGroupApp" | "addToFavorites" | "chooseAddress" | "chooseInvoiceTitle" | "login" | "subscribe" | "favorite" | "watchLater" | "openProfile" | "liveActivity" | "getRealtimePhoneNumber";
  29. lang?: "en" | "zh_CN" | "zh_TW";
  30. sessionFrom?: string;
  31. sendMessageTitle?: string;
  32. sendMessagePath?: string;
  33. sendMessageImg?: string;
  34. showMessageCard?: boolean;
  35. appParameter?: string;
  36. groupId?: string;
  37. guildId?: string;
  38. publicId?: string;
  39. phoneNumberNoQuotaToast?: boolean;
  40. createliveactivity?: boolean;
  41. fluid?: boolean;
  42. };