diff --git a/types/react-albus/index.d.ts b/types/react-albus/index.d.ts index d9d6b5ff99..9d34c93c64 100644 --- a/types/react-albus/index.d.ts +++ b/types/react-albus/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for react-albus 2.0 // Project: https://github.com/americanexpress/react-albus#readme // Definitions by: Sindre Seppola +// Conrad Reuter // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -34,5 +35,7 @@ export const Steps: React.ComponentType<{ export const Step: React.ComponentType<{ id: string; - render: (wizard: WizardContext) => React.ReactNode; -}>; +} & ( + | { render?: (wizard: WizardContext) => React.ReactNode; } + | { children: (wizard: WizardContext) => React.ReactNode; } +)>; diff --git a/types/react-albus/react-albus-tests.tsx b/types/react-albus/react-albus-tests.tsx index 3654845923..ed744c3e6f 100644 --- a/types/react-albus/react-albus-tests.tsx +++ b/types/react-albus/react-albus-tests.tsx @@ -37,15 +37,20 @@ const Example = () => ( )} /> - ( + + {({ previous, next }) => (

Dumbledore

+
)} - /> +
+ +
+

Harry

+
+
)} />