Created
September 4, 2021 08:25
-
-
Save Giuseppetm/7775bdd8bcda01e2a396e932114effb6 to your computer and use it in GitHub Desktop.
A ToolTip for Fluent UI framework with extended content
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{(() => { | |
const imageUrl = `https://studentiunimi-groups-propics.marcoaceti.workers.dev/${x.user_id}.png`; | |
const tooltipProps: ITooltipProps = { | |
onRenderContent: () => ( | |
<div> | |
<div className="mb-1"> | |
<Text variant="large" styles={semibold}><Link href={`https://t.me/${x.username}`}>@{x.username}</Link></Text><br /> | |
<Text variant="medium" styles={semibold}>{x.delega}</Text><br /> | |
</div> | |
<div> | |
<Text variant="medium">{x.cdl}</Text> | |
</div> | |
</div> | |
), | |
}; | |
return ( | |
<TooltipHost | |
tooltipProps={tooltipProps} | |
calloutProps={calloutPropsContributor} | |
styles={hostStyles} | |
delay={TooltipDelay.zero} | |
key={i} | |
> | |
<Persona onRenderPrimaryText={() => null} imageUrl={imageUrl} text={x.username} className="mb-1" size={PersonaSize.size72} /> | |
</TooltipHost> | |
) | |
})()} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment