Skip to content

Commit c6e6383

Browse files
committed
fix: code review
1 parent c5532e7 commit c6e6383

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

docs/tutorialkit.dev/src/content/docs/guides/overriding-components.mdx

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,22 @@ When overriding `TopBar` you can place TutorialKit's default components using fo
7171

7272
<Image src={uiDialog} alt="TutorialKit's Dialog" />
7373

74-
Component for overriding confirmation dialogs. This component has to be a React component.
74+
Component for overriding confirmation dialogs. This component has to be a React component and be the default export of that module.
7575

76-
It will receive same props that `@tutorialkit/react/dialog` supports.
76+
It will receive same props that `@tutorialkit/react/dialog` supports:
77+
78+
```ts
79+
interface Props {
80+
/** Title of the dialog */
81+
title: string;
82+
83+
/** Text for the confirmation button */
84+
confirmText: string;
85+
86+
/** Callback invoked when dialog is closed */
87+
onClose: () => void;
88+
89+
/** Content of the dialog */
90+
children: ReactNode;
91+
}
92+
```

packages/astro/src/vite-plugins/override-components.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export interface OverrideComponentsOptions {
5050
/**
5151
* Component for overriding confirmation dialogs.
5252
*
53-
* This component has to be a React component.
53+
* This component has to be a React component and be the default export of that module.
5454
* It will receive same props that `@tutorialkit/react/dialog` supports.
5555
*/
5656
Dialog?: string;

packages/react/src/core/Dialog.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ interface Props {
1212
/** Callback invoked when dialog is closed */
1313
onClose: () => void;
1414

15+
/** Content of the dialog */
1516
children: ReactNode;
1617
}
1718

0 commit comments

Comments
 (0)