Skip to content

Commit

Permalink
chore: added buttonClassName prop to label dropdown (#4671)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaryan610 authored and sriramveeraghanta committed Jun 10, 2024
1 parent 217ed6c commit a2e6596
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions web/components/issues/select/label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ import { useRouter } from "next/router";
import { usePopper } from "react-popper";
import { Check, Component, Plus, Search, Tag } from "lucide-react";
import { Combobox } from "@headlessui/react";
// hooks
// components
import { IssueLabelsList } from "@/components/ui";
// helpers
import { cn } from "@/helpers/common.helper";
// hooks
import { useLabel } from "@/hooks/store";
import { useDropdownKeyDown } from "@/hooks/use-dropdown-key-down";
import useOutsideClickDetector from "@/hooks/use-outside-click-detector";
// ui
// icons

type Props = {
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
Expand All @@ -21,10 +22,21 @@ type Props = {
disabled?: boolean;
tabIndex?: number;
createLabelEnabled?: boolean;
buttonClassName?: string;
};

export const IssueLabelSelect: React.FC<Props> = observer((props) => {
const { setIsOpen, value, onChange, projectId, label, disabled = false, tabIndex, createLabelEnabled = true } = props;
const {
setIsOpen,
value,
onChange,
projectId,
label,
disabled = false,
tabIndex,
createLabelEnabled = true,
buttonClassName,
} = props;
// router
const router = useRouter();
const { workspaceSlug } = router.query;
Expand Down Expand Up @@ -101,7 +113,7 @@ export const IssueLabelSelect: React.FC<Props> = observer((props) => {
<button
type="button"
ref={setReferenceElement}
className="h-full flex cursor-pointer items-center gap-2 text-xs text-custom-text-200"
className={cn("h-full flex cursor-pointer items-center gap-2 text-xs text-custom-text-200", buttonClassName)}
onClick={handleOnClick}
>
{label ? (
Expand Down

0 comments on commit a2e6596

Please sign in to comment.