fix: add tooltip, truncate (#5096)

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
pull/5107/head^2
Udit Takkar 2022-10-19 23:30:48 +05:30 committed by GitHub
parent 8ece2525e5
commit ee084aa8bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 4 deletions

View File

@ -1,5 +1,6 @@
import { getEventLocationType, locationKeyToString } from "@calcom/app-store/locations"; import { getEventLocationType, locationKeyToString } from "@calcom/app-store/locations";
import { classNames } from "@calcom/lib"; import { classNames } from "@calcom/lib";
import Tooltip from "@calcom/ui/v2/core/Tooltip";
import { Props } from "./pages/AvailabilityPage"; import { Props } from "./pages/AvailabilityPage";
@ -22,10 +23,16 @@ export function AvailableEventLocations({ locations }: { locations: Props["event
)} )}
alt={`${eventLocationType.label} icon`} alt={`${eventLocationType.label} icon`}
/> />
<Tooltip content={locationKeyToString(location)}>
<span className="max-w-full pr-4" key={location.type}> <a
{locationKeyToString(location)} target="_blank"
</span> href={locationKeyToString(location) ?? "/"}
className="truncate"
key={location.type}
rel="noreferrer">
{locationKeyToString(location)}
</a>
</Tooltip>
</div> </div>
); );
})} })}