style: create project modal (#1628)
* style: create project modal * fix: build error * fix: modal width
This commit is contained in:
parent
ccbcfecc6d
commit
a7b5ad55ab
18 changed files with 273 additions and 191 deletions
|
|
@ -10,17 +10,21 @@ import { DropdownProps } from "./types";
|
|||
|
||||
export type CustomSearchSelectProps = DropdownProps & {
|
||||
footerOption?: JSX.Element;
|
||||
multiple?: boolean;
|
||||
value: any;
|
||||
onChange: any;
|
||||
options:
|
||||
| {
|
||||
value: any;
|
||||
query: string;
|
||||
content: JSX.Element;
|
||||
content: React.ReactNode;
|
||||
}[]
|
||||
| undefined;
|
||||
};
|
||||
} & (
|
||||
| { multiple?: false; value: any } // if multiple is false, value can be anything
|
||||
| {
|
||||
multiple?: true;
|
||||
value: any[]; // if multiple is true, value should be an array
|
||||
}
|
||||
);
|
||||
|
||||
export const CustomSearchSelect = ({
|
||||
buttonClassName = "",
|
||||
|
|
@ -103,7 +107,7 @@ export const CustomSearchSelect = ({
|
|||
<div className="flex w-full items-center justify-start rounded-sm border-[0.6px] border-custom-border-200 bg-custom-background-90 px-2">
|
||||
<MagnifyingGlassIcon className="h-3 w-3 text-custom-text-200" />
|
||||
<Combobox.Input
|
||||
className="w-full bg-transparent py-1 px-2 text-xs text-custom-text-200 focus:outline-none"
|
||||
className="w-full bg-transparent py-1 px-2 text-xs text-custom-text-200 placeholder:text-custom-text-400 focus:outline-none"
|
||||
onChange={(e) => setQuery(e.target.value)}
|
||||
placeholder="Type to search..."
|
||||
displayValue={(assigned: any) => assigned?.name}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ const CustomSelect = ({
|
|||
);
|
||||
|
||||
type OptionProps = {
|
||||
children: string | JSX.Element;
|
||||
children: React.ReactNode;
|
||||
value: any;
|
||||
className?: string;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue