File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
packages/core/src/components/ListItem Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import useMergeRef from "../../hooks/useMergeRef";
1919import { ListContext } from "../List/utils/ListContext" ;
2020import { ListItemComponentType as ListItemComponentTypeEnum } from "./ListItemConstants" ;
2121import { type ListItemElement , type ListItemSize } from "./ListItem.types" ;
22+ import { type TooltipProps } from "../Tooltip/Tooltip" ;
2223import styles from "./ListItem.module.scss" ;
2324
2425export interface ListItemProps extends VibeComponentProps {
@@ -62,6 +63,10 @@ export interface ListItemProps extends VibeComponentProps {
6263 * The ARIA role of the list item.
6364 */
6465 role ?: AriaRole ;
66+ /**
67+ * Props passed to the tooltip displayed when hovering over the text.
68+ */
69+ tooltipProps ?: Partial < TooltipProps > ;
6570}
6671
6772const ListItem = forwardRef (
@@ -79,7 +84,8 @@ const ListItem = forwardRef(
7984 children,
8085 "aria-current" : ariaCurrent ,
8186 "data-testid" : dataTestId ,
82- role = "option"
87+ role = "option" ,
88+ tooltipProps
8389 } : ListItemProps ,
8490 ref : React . ForwardedRef < HTMLElement >
8591 ) => {
@@ -134,6 +140,7 @@ const ListItem = forwardRef(
134140 role = { role }
135141 tabIndex = { tabIndex }
136142 aria-current = { ariaCurrent }
143+ tooltipProps = { tooltipProps }
137144 >
138145 { children }
139146 </ Text >
You can’t perform that action at this time.
0 commit comments