Skip to content

Commit

Permalink
fix(react-tooltip): removes exposing of internal type FluentTriggerCo…
Browse files Browse the repository at this point in the history
…mponent (microsoft#25409)
  • Loading branch information
bsunderhus authored and NotWoods committed Nov 18, 2022
1 parent 24e6a7b commit 58c4c34
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
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;

0 comments on commit 58c4c34

Please sign in to comment.