Skip to content

Commit

Permalink
Merge pull request #153 from abusix/pla-1418-receive-disabled-prop-in…
Browse files Browse the repository at this point in the history
…-multicombobox

feat: receive property disabled in multi-combobox input
  • Loading branch information
pallendes authored Sep 30, 2024
2 parents 7fc0ea2 + 3a2489c commit 891fed8
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import {
ComboboxInputProps,
ComboboxButton as HeadlessUiComboboxButton,
ComboboxInput as HeadlessUiComboboxInput,
} from "@headlessui/react";
import React from "react";
import { CaretDownIcon } from "../../../icons";

export interface MultiComboboxInputProps {
export interface MultiComboboxInputProps extends Omit<ComboboxInputProps, "displayValue"> {
id: string;
displayValue: string;
placeholder: string;
Expand All @@ -19,6 +20,7 @@ export const MultiComboboxInput = ({
placeholder,
onChange,
showButton = true,
...props
}: MultiComboboxInputProps) => {
return (
<div className="relative">
Expand All @@ -29,6 +31,7 @@ export const MultiComboboxInput = ({
displayValue={() => displayValue}
onChange={onChange}
className="paragraph-100 flex h-8 w-full items-center rounded border border-neutral-400 py-2 pl-3 pr-8 focus-visible:border-primary-400 focus-visible:ring-2 focus-visible:ring-primary-200"
{...props}
/>
{showButton ? (
<HeadlessUiComboboxButton className="absolute inset-y-0 right-0 flex items-center px-1.5">
Expand Down

0 comments on commit 891fed8

Please sign in to comment.