Skip to content
This repository was archived by the owner on Oct 3, 2021. It is now read-only.
This repository was archived by the owner on Oct 3, 2021. It is now read-only.

Feature Request: Declarative Step Content Switching #5

@r-bt

Description

@r-bt

Proposal

Switch from passing reference to React Component as content in ProgressStep object to providing a component which only renders it's children when it's step matches the current step.

Example

return (
      <ProgressBar />
      <StepProgress>
         <Step step={1}>
             <h1> First step </h1>
         </Step>
         <Step step={2}>
             <h1> Second step </h1>
         </Step>
      </StepProgess>
);

Other

This is similar to how react-router currently works and allows for component composition along with better readability (in my opinion). I'm not sure on the names of the components so I'm open to suggestions. Again, if this is something you'd be interested in incorporating I'll submit a pull request

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions