Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@tkwant/react-steps
Advanced tools
Works also for mobile devices
Npm Package: https://www.npmjs.com/package/@tkwant/react-steps
Demo: https://stepper.tkwant.de
yarn add @tkwant/react-steps
npm i @tkwant/react-steps
import React, { useState } from "react";
import { Stepper, Step } from "./Stepper/Stepper";
interface Props {}
const App: React.FC<Props> = () => {
const [curStep, setCurStep] = useState(0);
const [step2Data, setStep2Data] = useState("");
const renderContent = () => {
switch (curStep) {
case 0:
return (
<div style={{ display: "flex", justifyContent: "center" }}>
First Step
</div>
);
case 1:
return (
<div style={{ display: "flex", justifyContent: "center" }}>
<p style={{ marginRight: 2 }}>My Validation: </p>
<input
style={{ border: "2px solid red" }}
onChange={(e) => setStep2Data(e.currentTarget.value)}
value={step2Data}
/>
</div>
);
default:
return null;
}
};
return (
<>
<Stepper
style={{ padding: 10 }}
curStep={curStep}
setCurStep={setCurStep}
>
<Step label="Step 0 " />
<Step label="Step 1" />
<Step locked={step2Data === ""}>??</Step>
<Step locked={curStep < 2} />
<Step locked={curStep < 3} />
<Step locked={curStep < 4} />
<Step locked={curStep < 5} />
</Stepper>
{renderContent()}
</>
);
};
export default App;
Prop | Description | Default |
---|---|---|
children | ||
curStep | ||
setCurStep | ||
className | optional | "" |
activeColor | optional | "#0b294b" |
inActiveColor | optional | "#D1D5DB" |
borderColor | optional | "#8fb3db" |
stepSize | optional | 60 |
progressBarActiveColor | optional | "green" |
progressBarBackgroundColor | optional | "lightgray" |
smallScreenShowProgressbar | optional | true |
style | optional | {} |
Prop | Description | Default |
---|---|---|
children | optional | current Index |
label | optional | "" |
locked | optional | false |
FAQs
React Stepper which can also be used on mobile devices
The npm package @tkwant/react-steps receives a total of 6 weekly downloads. As such, @tkwant/react-steps popularity was classified as not popular.
We found that @tkwant/react-steps 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.