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-dialog",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { ARIAButtonResultProps } from '@fluentui/react-aria';
import { ARIAButtonType } from '@fluentui/react-aria';
import type { ComponentProps } from '@fluentui/react-utilities';
import type { ComponentState } from '@fluentui/react-utilities';
import type { FluentTriggerComponent } from '@fluentui/react-utilities';
import type { ForwardRefComponent } from '@fluentui/react-utilities';
import { JSXElementConstructor } from 'react';
import * as React_2 from 'react';
Expand Down Expand Up @@ -163,7 +162,7 @@ export type DialogTitleSlots = {
export type DialogTitleState = ComponentState<DialogTitleSlots>;

// @public
export const DialogTrigger: React_2.FC<DialogTriggerProps> & FluentTriggerComponent;
export const DialogTrigger: React_2.FC<DialogTriggerProps>;

// @public (undocumented)
export type DialogTriggerAction = 'open' | 'close';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ import type { FluentTriggerComponent } from '@fluentui/react-utilities';
* to it's wrapped child, but it won't be able to alter the dialog `open` state anymore,
* in that case the user must provide a `controlled state`
*/
export const DialogTrigger: React.FC<DialogTriggerProps> & FluentTriggerComponent = props => {
export const DialogTrigger: React.FC<DialogTriggerProps> = props => {
const state = useDialogTrigger_unstable(props);

return renderDialogTrigger_unstable(state);
};

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