[WEB-4661] fix: move helpers file into utils #7568
This commit is contained in:
parent
a085c0ec62
commit
047080a66f
59 changed files with 68 additions and 72 deletions
|
|
@ -1,8 +1,7 @@
|
|||
import React, { Fragment } from "react";
|
||||
// headless ui
|
||||
import { Combobox } from "@headlessui/react";
|
||||
import React, { Fragment } from "react";
|
||||
// helper
|
||||
import { cn } from "../../../helpers";
|
||||
import { cn } from "../../utils";
|
||||
import { IMultiSelectDropdownButton, ISingleSelectDropdownButton } from "../dropdown";
|
||||
|
||||
export const DropdownButton: React.FC<IMultiSelectDropdownButton | ISingleSelectDropdownButton> = (props) => {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
import React, { FC, useEffect, useRef } from "react";
|
||||
// headless ui
|
||||
import { Combobox } from "@headlessui/react";
|
||||
// icons
|
||||
import { Search } from "lucide-react";
|
||||
import React, { FC, useEffect, useRef } from "react";
|
||||
// helpers
|
||||
import { cn } from "../../../helpers";
|
||||
import { cn } from "../../utils";
|
||||
|
||||
interface IInputSearch {
|
||||
isOpen: boolean;
|
||||
|
|
@ -32,9 +30,11 @@ export const InputSearch: FC<IInputSearch> = (props) => {
|
|||
|
||||
useEffect(() => {
|
||||
if (isOpen && !isMobile) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||
inputRef.current && inputRef.current.focus();
|
||||
}
|
||||
}, [isOpen, isMobile]);
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
|
|
|
|||
|
|
@ -1,14 +1,12 @@
|
|||
import React from "react";
|
||||
// headless ui
|
||||
import { Combobox } from "@headlessui/react";
|
||||
// icons
|
||||
import { Check } from "lucide-react";
|
||||
// components
|
||||
import { DropdownOptionsLoader, InputSearch } from ".";
|
||||
import React from "react";
|
||||
// helpers
|
||||
import { cn } from "../../../helpers";
|
||||
import { cn } from "../../utils";
|
||||
// types
|
||||
import { IMultiSelectDropdownOptions, ISingleSelectDropdownOptions } from "../dropdown";
|
||||
// components
|
||||
import { DropdownOptionsLoader, InputSearch } from ".";
|
||||
|
||||
export const DropdownOptions: React.FC<IMultiSelectDropdownOptions | ISingleSelectDropdownOptions> = (props) => {
|
||||
const {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { usePopper } from "react-popper";
|
|||
// plane imports
|
||||
import { useOutsideClickDetector } from "@plane/hooks";
|
||||
// local imports
|
||||
import { cn } from "../../helpers";
|
||||
import { cn } from "../utils";
|
||||
import { useDropdownKeyPressed } from "../hooks/use-dropdown-key-pressed";
|
||||
import { DropdownButton } from "./common";
|
||||
import { DropdownOptions } from "./common/options";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { usePopper } from "react-popper";
|
|||
// plane imports
|
||||
import { useOutsideClickDetector } from "@plane/hooks";
|
||||
// local imports
|
||||
import { cn } from "../../helpers";
|
||||
import { cn } from "../utils";
|
||||
import { useDropdownKeyPressed } from "../hooks/use-dropdown-key-pressed";
|
||||
import { DropdownButton } from "./common";
|
||||
import { DropdownOptions } from "./common/options";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue