diff --git a/types/wordpress__components/guide/index.d.ts b/types/wordpress__components/guide/index.d.ts new file mode 100644 index 000000000000000..ebb175df7d7568a --- /dev/null +++ b/types/wordpress__components/guide/index.d.ts @@ -0,0 +1,23 @@ +import type { ComponentType, ReactNode } from 'react'; + +interface GuidePage { + content: ReactNode; + image?: ReactNode; +} + +interface GuideProps { + className?: string; + contentLabel?: string; + finishButtonText?: ReactNode; + onFinish?: () => void; + pages?: GuidePage[]; + + /** + * @deprecated use the `pages` prop instead + * @since 5.5 + */ + children?: ReactNode; +} + +declare const Guide: ComponentType; +export default Guide; diff --git a/types/wordpress__components/index.d.ts b/types/wordpress__components/index.d.ts index bbb46e277f89c31..be6de75b13a48a0 100644 --- a/types/wordpress__components/index.d.ts +++ b/types/wordpress__components/index.d.ts @@ -48,6 +48,7 @@ export { default as FontSizePicker } from './font-size-picker'; export { default as FormFileUpload } from './form-file-upload'; export { default as FormToggle } from './form-toggle'; export { default as FormTokenField } from './form-token-field'; +export { default as Guide } from './guide'; export { default as Icon } from './icon'; export { default as IconButton } from './icon-button'; export { default as KeyboardShortcuts } from './keyboard-shortcuts'; diff --git a/types/wordpress__components/wordpress__components-tests.tsx b/types/wordpress__components/wordpress__components-tests.tsx index cc4548f8ded49a9..5ec7f9f7b8d6c6b 100644 --- a/types/wordpress__components/wordpress__components-tests.tsx +++ b/types/wordpress__components/wordpress__components-tests.tsx @@ -404,6 +404,23 @@ const buttonGroupRef = createRef(); onChange={tokens => console.log(tokens)} />; +// +// guide +// + { + console.log('finished'); + } } + pages={ [ + { + content:

My Page

, + image:

My Page Image

, + } + ] } +/>; + // // icon //