Make stepper use ReactNode
This commit is contained in:
parent
8e86803448
commit
7c6f65bccf
|
@ -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>
|
||||
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue