style: label dropdown empty state

This commit is contained in:
anmolsinghbhatia 2023-06-30 18:28:12 +05:30
parent 32bf2ed56a
commit fc15da826b
2 changed files with 9 additions and 1 deletions

View File

@ -118,6 +118,8 @@ export const ViewLabelSelect: React.FC<Props> = ({
</button>
);
const noResultIcon = <TagIcon className="h-3.5 w-3.5 text-brand-secondary" />;
return (
<>
{projectId && (
@ -141,6 +143,7 @@ export const ViewLabelSelect: React.FC<Props> = ({
disabled={isNotAllowed}
selfPositioned={selfPositioned}
footerOption={footerOption}
noResultIcon={noResultIcon}
dropdownWidth="w-full min-w-[12rem]"
/>
</>

View File

@ -29,6 +29,7 @@ type CustomSearchSelectProps = {
selfPositioned?: boolean;
multiple?: boolean;
footerOption?: JSX.Element;
noResultIcon?: JSX.Element;
dropdownWidth?: string;
};
export const CustomSearchSelect = ({
@ -47,6 +48,7 @@ export const CustomSearchSelect = ({
disabled = false,
selfPositioned = false,
multiple = false,
noResultIcon,
footerOption,
dropdownWidth,
}: CustomSearchSelectProps) => {
@ -171,7 +173,10 @@ export const CustomSearchSelect = ({
</Combobox.Option>
))
) : (
<p className="text-center text-brand-secondary">No matching results</p>
<span className="flex items-center gap-2 p-1">
{noResultIcon && noResultIcon}
<p className="text-left text-brand-secondary ">No matching results</p>
</span>
)
) : (
<p className="text-center text-brand-secondary">Loading...</p>