Make stepper use ReactNode

This commit is contained in:
Arnaud 2024-08-28 10:05:18 +02:00
parent 8e86803448
commit 7c6f65bccf
No known key found for this signature in database
GPG Key ID: 69D6CE281FCAE663
2 changed files with 5 additions and 5 deletions

View File

@ -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({
<Spinner width={"3rem"} />
</div>
) : (
<Body />
<>{Body}</>
)}
</div>

View File

@ -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.