Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
react-simple-step-wizard
Advanced tools
Readme
A simple and composable step wizard in React! Made with ❤ in El Salvador 🇸🇻
Click here to see a live demo!
npm install -S react-simple-step-wizard
import Wizard from 'react-simple-step-wizard';
import React, { Component } from 'react';
const Step1 = () => <div>This is Step 1</div>;
const Step2 = () => <div>This is Step 2</div>;
const Step3 = () => <div>This is Step 3</div>;
const Step4 = () => <div>This is Step 4</div>;
const Step5 = () => <div>This is Step 5</div>;
const Step6 = () => <div>This is Step 6</div>;
const MyStepTracker = ({ currentStep = 0, steps = [] }) => (
<div>
<p>Current step is: {steps[currentStep]}</p>
</div>
);
const MyNavigator = ({
getFirstStepProps,
getLastStepProps,
getNextStepProps,
getPrevStepProps,
}) => (
<div>
<button type="button" {...getFirstStepProps()}>
<< First
</button>
<button type="button" {...getPrevStepProps()}>
< Back
</button>
<button type="button" {...getNextStepProps()}>
Next >
</button>
<button type="button" {...getLastStepProps()}>
Last >>
</button>
</div>
);
class App extends Component {
state = { isCustomizeVisible: true };
handleStepChange = currentStep => {
console.log(currentStep);
};
onClick = () => {
this.setState(prevState => ({
isCustomizeVisible: !prevState.isCustomizeVisible,
}));
};
render() {
const { isCustomizeVisible } = this.state;
return (
<div>
<h1>react-simple-step-wizard demo</h1>
<div>
<p>Step 3 visible: {isCustomizeVisible.toString()}</p>
<button type="button" onClick={this.onClick}>
Toggle Step 3
</button>
</div>
<Wizard onStepChange={this.handleStepChange}>
<Wizard.StepTracker />
<Wizard.Steps>
<Step1 stepLabel="Search" />
<Step2 stepLabel="Select" />
<Step3 stepLabel="Customize" stepCondition={isCustomizeVisible} />
<Step4 stepLabel="Review" />
<Wizard.StepGroup stepLabel="Submit">
<Step5 />
<Step6 />
</Wizard.StepGroup>
</Wizard.Steps>
{/* You can implement your custom components via render-props */}
<Wizard.StepTracker>
{stepTrackerProps => <MyStepTracker {...stepTrackerProps} />}
</Wizard.StepTracker>
<Wizard.Navigator>
{navigatorProps => <MyNavigator {...navigatorProps} />}
</Wizard.Navigator>
</Wizard>
</div>
);
}
}
export default App;
Provide an accessible and composable API to be used with older react versions that don't support hooks.
Rewrite lib core and expose some of the APIs using react hooks.
MIT © jonathanpalma
FAQs
React simple step wizard
The npm package react-simple-step-wizard receives a total of 119 weekly downloads. As such, react-simple-step-wizard popularity was classified as not popular.
We found that react-simple-step-wizard demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.