devrnt / react-use-wizard

🧙 A React wizard (stepper) builder without the hassle, powered by hooks.

Home Page:https://devrnt.github.io/react-use-wizard/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve documentation for the "wrapper" prop

Ali762 opened this issue · comments

Explain how to use the wrapper with some simple examples.

For example, if each step needed to be wrapped in a <div className="flex-grow">

I think one of the issues might be the type definitions.

If I define

export const WizardWrapper = ({children}) => {
  return <div className="flex-grow h-full overflow-y-scroll p-4">{children}</div>;
};

I get a type error. However, it works if I change it to the following:

export const WizardWrapper = (props) => {
  const { children } = props;
  return <div className="flex-grow h-full overflow-y-scroll p-4">{children}</div>;
};

Hi, you can find an example here. If the usage of wrapper is not clear enough, you're welcome to submit a pull request