UNPKG

@hhgtech/hhg-components

Version:
65 lines (64 loc) 2.45 kB
import React, { HTMLAttributes, ReactNode } from 'react'; import { DefaultProps, Selectors } from '@mantine/core'; import { CardAuthor as CardAuthorUI } from "../../../../components/ui/cardAuthor"; import { DataTrackingType } from "../../../../interfaces/types"; import { Role } from "../../../../interfaces/types"; import { AuthorBadgeItem } from "./authorBadgeItem"; import { DisplayName } from "./displayName"; import useStyles from "./index.styles"; import { Community } from "../../../interfaces/types"; import { Props as UserAvatarProps } from "../../atoms/userAvatar"; import type { ProfileDetailProps } from "../profileDetail"; type MyComponentStylesNames = Selectors<typeof useStyles>; export interface Props extends DefaultProps<MyComponentStylesNames, HTMLAttributes<HTMLDivElement>> { userId?: number | string; timeText?: string; name?: string; username?: string; email?: string; url?: string; avatar?: string; community?: Community; type?: 'comment' | 'reply' | 'most-engaging'; userType?: 'member' | 'chatbot'; role?: Role; specialty?: string; organisation?: string; expertId?: string; doctorId?: string; hospitalId?: string; isMarryBaby?: boolean; title?: string; hasQuickBooking?: boolean; handleMakeAppointment?: (doctorId?: string, hospitalId?: string) => void; communityTrackingAttr?: DataTrackingType; isAnonymous?: boolean; showDetailPopup?: boolean; showChatbotButton?: boolean; subLine?: ReactNode; mainLine?: ReactNode; profileProps?: any; profileModalProps?: { zIndex?: number; } & ProfileDetailProps; hideInfo?: boolean; authActionWrapper?: () => void; extendEle?: ReactNode; avatarProps?: UserAvatarProps; avatarIcon?: ReactNode; onCloseFromPost?: () => void; onChatWithBot?: () => void; badgeIconSize?: number; hideBackground?: boolean; children?: ReactNode; } export interface CompoundedComponent extends React.ForwardRefExoticComponent<Props & DataTrackingType> { MainText: typeof CardAuthorUI.MainText; SubText: typeof CardAuthorUI.SubText; SubTextRow: typeof CardAuthorUI.SubTextRow; SubDivider: typeof CardAuthorUI.SubDivider; AuthorBadge: typeof AuthorBadgeItem; DisplayName: typeof DisplayName; } declare const CardAuthor: CompoundedComponent; export { CardAuthor };