Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "removes exposing of internal type FluentTriggerComponent",
"packageName": "@fluentui/react-tooltip",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import type { ComponentProps } from '@fluentui/react-utilities';
import type { ComponentState } from '@fluentui/react-utilities';
import type { FluentTriggerComponent } from '@fluentui/react-utilities';
import type { PortalProps } from '@fluentui/react-portal';
import type { PositioningShorthand } from '@fluentui/react-positioning';
import * as React_2 from 'react';
Expand All @@ -23,7 +22,7 @@ export type OnVisibleChangeData = {
export const renderTooltip_unstable: (state: TooltipState) => JSX.Element;

// @public
export const Tooltip: React_2.FC<TooltipProps> & FluentTriggerComponent;
export const Tooltip: React_2.FC<TooltipProps>;

// @public (undocumented)
export const tooltipClassNames: SlotClassNames<TooltipSlots>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ import type { FluentTriggerComponent } from '@fluentui/react-utilities';
/**
* A tooltip provides light weight contextual information on top of its target element.
*/
export const Tooltip: React.FC<TooltipProps> & FluentTriggerComponent = props => {
export const Tooltip: React.FC<TooltipProps> = props => {
const state = useTooltip_unstable(props);

useTooltipStyles_unstable(state);
return renderTooltip_unstable(state);
};

Tooltip.displayName = 'Tooltip';
Tooltip.isFluentTriggerComponent = true;
// type casting here is required to ensure internal type FluentTriggerComponent is not leaked
(Tooltip as FluentTriggerComponent).isFluentTriggerComponent = true;