Skip to content

Commit

Permalink
Merge pull request #36 from juneHQ/fb-fix-build-error
Browse files Browse the repository at this point in the history
Fix build error preventing new versions to ship
  • Loading branch information
ferrucc-io authored May 21, 2024
2 parents a95875c + 0b612e1 commit a8b5b42
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions lib/components/Command/CommandInput.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useRef } from "react";
import { Combobox } from "@headlessui/react";
import { ComboboxInput } from "@headlessui/react";
import { cx } from "../common/utils";
import { MagnifyingGlassIcon } from "../../icons/MagnifyingGlassIcon";

Expand Down Expand Up @@ -51,14 +51,14 @@ export const CommandInput: React.FC<ICommandInputProps> = ({
return (
<div className={cx("relative flex items-center", className ?? "")}>
{icon}
<Combobox.Input
<ComboboxInput
as="input"
ref={inputRef}
autoComplete="off"
value={value ?? ""}
onChange={onChange}
placeholder={placeholder ?? "Search..."}
className="block w-full rounded-md border-0 py-1.5 pl-8 pr-14 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-gray-300 sm:text-sm sm:leading-4"
className="block w-full rounded-md border-0 py-1.5 pl-8 pr-14 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-gray-300 sm:text-sm sm:leading-4 font-medium normal-case tracking-normal"
/>
</div>
);
Expand Down
6 changes: 3 additions & 3 deletions lib/components/Command/CommandList.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HTMLAttributes } from "react";
import { Combobox } from "@headlessui/react";
import { ComboboxOptions } from "@headlessui/react";
import { cx } from "../common/utils";

interface ICommandListProps extends Omit<HTMLAttributes<HTMLUListElement>, "onCopy"> {
Expand All @@ -15,14 +15,14 @@ export const CommandList: React.FC<ICommandListProps> = ({
...props
}) => {
return (
<Combobox.Options
<ComboboxOptions
static
as="ul"
className={cx(className ?? "flex flex-col gap-1")}
data-testid={dataTestId}
{...props}
>
{children}
</Combobox.Options>
</ComboboxOptions>
);
};
10 changes: 5 additions & 5 deletions lib/components/Command/CommandOption.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { HTMLAttributes } from "react";
import { Combobox } from "@headlessui/react";
import { ComboboxOption } from "@headlessui/react";
import { cx } from "../common/utils";

interface ICommandOptionProps extends HTMLAttributes<HTMLLIElement> {
interface ICommandOptionProps extends HTMLAttributes<HTMLDivElement> {
value: string | (() => void);
disabled?: boolean;
activeClassName?: string;
Expand All @@ -21,13 +21,13 @@ export const CommandOption: React.FC<ICommandOptionProps> = ({
...props
}) => {
return (
<Combobox.Option
<ComboboxOption
data-testid={testId}
value={value}
disabled={disabled}
{...props}
>
{({ active: isActive }) => (
{({ focus: isActive }) => (
<div
className={cx(
"flex w-full cursor-pointer items-center justify-between rounded-md px-2 py-1.5",
Expand All @@ -43,6 +43,6 @@ export const CommandOption: React.FC<ICommandOptionProps> = ({
{rightIcon}
</div>
)}
</Combobox.Option>
</ComboboxOption>
);
};

0 comments on commit a8b5b42

Please sign in to comment.