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

View File

@ -29,6 +29,7 @@ type CustomSearchSelectProps = {
selfPositioned?: boolean; selfPositioned?: boolean;
multiple?: boolean; multiple?: boolean;
footerOption?: JSX.Element; footerOption?: JSX.Element;
noResultIcon?: JSX.Element;
dropdownWidth?: string; dropdownWidth?: string;
}; };
export const CustomSearchSelect = ({ export const CustomSearchSelect = ({
@ -47,6 +48,7 @@ export const CustomSearchSelect = ({
disabled = false, disabled = false,
selfPositioned = false, selfPositioned = false,
multiple = false, multiple = false,
noResultIcon,
footerOption, footerOption,
dropdownWidth, dropdownWidth,
}: CustomSearchSelectProps) => { }: CustomSearchSelectProps) => {
@ -171,7 +173,10 @@ export const CustomSearchSelect = ({
</Combobox.Option> </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> <p className="text-center text-brand-secondary">Loading...</p>