Skip to content

Commit

Permalink
chore: update option tooltip prop.
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekshourya29 committed Oct 4, 2024
1 parent 489157d commit b285e45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/ui/src/dropdowns/custom-search-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@ export const CustomSearchSelect = (props: ICustomSearchSelectProps) => {
<>
<span className="flex-grow truncate">{option.content}</span>
{selected && <Check className="h-3.5 w-3.5 flex-shrink-0" />}
{option.optionTooltip && (
{option.tooltip && (
<>
{
typeof option.optionTooltip === "string" ? (
<Tooltip tooltipContent={option.optionTooltip}>
typeof option.tooltip === "string" ? (
<Tooltip tooltipContent={option.tooltip}>
<Info className="h-3.5 w-3.5 flex-shrink-0 cursor-pointer text-custom-text-200" />
</Tooltip>
) : (
option.optionTooltip
option.tooltip
)
}
</>
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/dropdowns/helper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ interface CustomSearchSelectProps {
query: string;
content: React.ReactNode;
disabled?: boolean;
optionTooltip?: string | React.ReactNode;
tooltip?: string | React.ReactNode;
}[]
| undefined;
}
Expand Down

0 comments on commit b285e45

Please sign in to comment.