UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

43 lines 2.51 kB
import { UserCardSize } from '@/utils/SynapseConstants'; import { UserProfile } from '@sage-bionetworks/synapse-types'; import { AvatarSize } from './Avatar'; import { MenuAction } from './UserCardContextMenu'; export type UserCardProps = { /** A UserProfile may be used for data for the card. You must supply one of `userProfile`, `alias`, `ownerId` */ userProfile?: UserProfile; /** An alias that resolves the ownerId for the UserProfile. You must supply one of `userProfile`, `alias`, `ownerId` */ alias?: string; /** The unique ownerId of the UserProfile. You must supply one of `userProfile`, `alias`, `ownerId` */ ownerId?: string; /** Whether to hide the user's Synapse email address */ hideEmail?: boolean; /** If set, the corresponding image will be shown for the user. */ preSignedURL?: string; /** Specifies the card size */ size: UserCardSize; /** For the small user card or avatar, shows the medium user card on mouseover */ showCardOnHover?: boolean; /** @deprecated For the small user card, hides the tooltip observed when hovering over the profile image. */ hideTooltip?: boolean; /** Specifies the dropdown menu functionality for the ellipsis on medium/large cards. If field === 'SEPERATOR' then a break will occur in the menu. If left undefined, the menu will not render to the screen. */ menuActions?: MenuAction[]; /** The link to point to on the username, defaults to https://www.synapse.org/Profile:${userProfile.ownerId} */ link?: string; openLinkInNewTab?: boolean; /** Disables the `@username` link for the small user card (if `showCardOnHover` is false). For the medium user card, disables linking the user's name to their profile (or other specified destination) */ disableLink?: boolean; isCertified?: boolean; isValidated?: boolean; /** Determines the size of the avatar when size === 'AVATAR' or (size === 'SMALL' and withAvatar is true) */ avatarSize?: AvatarSize; /** Whether to show the avatar with the name for the small user card */ withAvatar?: boolean; /** @deprecated Whether to show the full name in the small user card */ showFullName?: boolean; className?: string; /** @deprecated show certification/validation badges for small user card */ showAccountLevelIcon?: boolean; }; export declare function UserCard(props: UserCardProps): import("react/jsx-runtime").JSX.Element; export default UserCard; //# sourceMappingURL=UserCard.d.ts.map