fix: add check mark to selected option in destionation calendar selector (#10583)

pull/10677/head^2
John Victor 2023-08-09 17:23:47 -03:00 committed by GitHub
parent fa9a8cca89
commit 24e60498f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
import type { DestinationCalendar } from "@calcom/prisma/client";
import { trpc } from "@calcom/trpc/react";
import { Select } from "@calcom/ui";
import { Check } from "@calcom/ui/components/icon";
interface Props {
onChange: (value: { externalId: string; integration: string }) => void;
@ -37,7 +38,10 @@ const OptionComponent = ({ ...props }: OptionProps<Option>) => {
const { label } = props.data;
return (
<components.Option {...props}>
<span>{label}</span>
<div className="flex">
<span className="mr-auto">{label}</span>
{props.isSelected && <Check className="ml-2 h-4 w-4" />}
</div>
</components.Option>
);
};