From 7c6f65bccfec2d68a66926f304c474c51cb2f558 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Wed, 28 Aug 2024 10:05:18 +0200 Subject: [PATCH] Make stepper use ReactNode --- src/components/Stepper/Stepper.tsx | 6 +++--- src/components/Upload/Upload.tsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/Stepper/Stepper.tsx b/src/components/Stepper/Stepper.tsx index 579ae8d..7a05af6 100644 --- a/src/components/Stepper/Stepper.tsx +++ b/src/components/Stepper/Stepper.tsx @@ -1,6 +1,6 @@ import { Button } from "../Button/Button"; import "./stepper.css"; -import { CSSProperties } from "react"; +import { CSSProperties, ReactNode } from "react"; import { Spinner } from "../Spinner/Spinner"; import { Step } from "./Step"; @@ -21,7 +21,7 @@ type Props = { /** * The current component to show. */ - Body: () => JSX.Element; + Body: ReactNode; // The current step to display in stepper state. step: number; @@ -98,7 +98,7 @@ export function Stepper({ ) : ( - + <>{Body} )} diff --git a/src/components/Upload/Upload.tsx b/src/components/Upload/Upload.tsx index 0e4b19b..a531357 100644 --- a/src/components/Upload/Upload.tsx +++ b/src/components/Upload/Upload.tsx @@ -30,7 +30,7 @@ type Props = { * Event triggered when a file is uploaded. * The cid is the unique identifier of the file in Codex network. */ - onSuccess?: (cid: string) => void; + onSuccess?: (cid: string, file: File) => void; /* * Event triggered when the user selected files to upload. @@ -76,7 +76,7 @@ type Props = { * --codex-color-primary * --codex-color * --codex-color-error - * --codex-color-warning + * --codex-color-warning */ style?: CustomStyleCSS; };