mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
Adjusted naming of WizardStepObject to StepObject
This commit is contained in:
14
types/react-albus/index.d.ts
vendored
14
types/react-albus/index.d.ts
vendored
@@ -9,13 +9,13 @@
|
||||
import * as React from "react";
|
||||
import { History } from "history";
|
||||
|
||||
export interface WizardStepObject {
|
||||
export interface StepObject {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface WizardContext {
|
||||
step: WizardStepObject;
|
||||
steps: WizardStepObject[];
|
||||
step: StepObject;
|
||||
steps: StepObject[];
|
||||
history: History;
|
||||
next: () => void;
|
||||
previous: () => void;
|
||||
@@ -42,22 +42,22 @@ export interface WizardProps {
|
||||
export const Wizard: React.ComponentType<WizardProps>;
|
||||
|
||||
export interface StepsProps {
|
||||
step?: WizardStepObject;
|
||||
step?: StepObject;
|
||||
}
|
||||
|
||||
export const Steps: React.ComponentType<StepsProps>;
|
||||
|
||||
export type StepProps = WizardStepObject & (
|
||||
export type StepProps = StepObject & (
|
||||
| { render?: (wizard: WizardContext) => React.ReactNode }
|
||||
| { children: (wizard: WizardContext) => React.ReactNode });
|
||||
|
||||
/**
|
||||
* In addition to id, any additional props added to <Step> will be available on each step object.
|
||||
* This can be used to add names, descriptions, or other metadata to each step.
|
||||
* To use this feature generally you need to augment the WizardStepObject
|
||||
* To use this feature globally in your project you need to augment the StepObject
|
||||
* @example
|
||||
* declare module "react-albus" {
|
||||
* interface WizardStepObject {
|
||||
* interface StepObject {
|
||||
* propName: string;
|
||||
* }
|
||||
* }
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as React from "react";
|
||||
import { Wizard, Step, Steps, withWizard } from "react-albus";
|
||||
|
||||
declare module "react-albus" {
|
||||
interface WizardStepObject {
|
||||
interface StepObject {
|
||||
quote?: string;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user