Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WEB-1501] chore: added buttonClassName prop to labels dropdown #4671

Merged
merged 1 commit into from
May 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading