Skip to content

Commit

Permalink
feat(tooltip, listing): fixes and improvements (#44)
Browse files Browse the repository at this point in the history
* feat(tooltip, listing): fixes and improvements

* feat(tooltip, listing): fixes and improvements
  • Loading branch information
abhishekv24 authored Jun 4, 2024
1 parent 9761f9e commit 790afc4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/apsara-ui/src/Listing/Filters/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const Filters = ({ filteredFieldData, label = "Filters", disabled = false, ...pr

return (
<StyledPopover open={open} onOpenChange={(open) => setOpen(open)}>
<PopoverTrigger asChild>
<PopoverTrigger asChild className="popover-trigger">
<span aria-label="Update dimensions">
<StyledBadge dot={!!filteredFieldDataLength}>
<FilterButton type="default" disabled={disabled}>
Expand Down
2 changes: 2 additions & 0 deletions packages/apsara-ui/src/Listing/Listing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ function Listing<T>({
renderHeader = null,
renderBody = null,
renderExtraFilters = null,
renderExtraItems = null,
resourcePath = "/",
calculateRowHeight,
calculateColumnWidth,
Expand Down Expand Up @@ -58,6 +59,7 @@ function Listing<T>({
/>
)}
{renderExtraFilters}
{renderExtraItems}
</ListingSearch>
);
}
Expand Down
1 change: 1 addition & 0 deletions packages/apsara-ui/src/Listing/Listing.types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export interface ListingProps<T> {
calculateRowHeight?: (index: number, defaultRowHeight: number) => number;
calculateColumnWidth?: (index: number, defaultColumnWidth: number) => number;
renderExtraFilters?: React.ReactNode;
renderExtraItems?: React.ReactNode;
renderHeader?: React.ReactNode;
renderBody?: React.ReactNode;
rowClick?: (props: any) => any;
Expand Down
17 changes: 13 additions & 4 deletions packages/apsara-ui/src/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,19 @@ const Tooltip = ({
<RadixTooltip.Trigger asChild>
<span>{children}</span>
</RadixTooltip.Trigger>
<TooltipContent className="TooltipContent" sideOffset={5} side={placement} style={style} avoidCollisions={avoidCollisions} {...props}>
{title}
<RadixTooltip.Arrow className="TooltipArrow" />
</TooltipContent>
<RadixTooltip.Portal>
<TooltipContent
className="TooltipContent"
sideOffset={5}
side={placement}
style={style}
avoidCollisions={avoidCollisions}
{...props}
>
{title}
<RadixTooltip.Arrow className="TooltipArrow" />
</TooltipContent>
</RadixTooltip.Portal>
</RadixTooltip.Root>
</RadixTooltip.Provider>
);
Expand Down

0 comments on commit 790afc4

Please sign in to comment.