Fixes overflow for long calendar names (#2261)

- Adds title attribute for overflowed text

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
This commit is contained in:
Omar López 2022-03-24 09:43:07 -07:00 committed by GitHub
parent a15b93c276
commit 785b156f95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,11 +53,14 @@ const DestinationCalendarSelector = ({
})),
})) ?? [];
return (
<div className="relative">
<div className="relative" title={`${t("select_destination_calendar")}: ${selectedOption?.label || ""}`}>
{/* There's no easy way to customize the displayed value for a Select, so we fake it. */}
{!hidePlaceholder && (
<div className="pointer-events-none absolute z-10">
<Button size="sm" color="secondary" className="m-[1px] rounded-sm border-transparent">
<div className="pointer-events-none absolute z-10 w-full">
<Button
size="sm"
color="secondary"
className="m-[1px] w-[calc(100%_-_40px)] overflow-hidden overflow-ellipsis whitespace-nowrap rounded-sm border-none leading-5">
{t("select_destination_calendar")}: {selectedOption?.label || ""}
</Button>
</div>