Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@crave/farmblocks-stepper

Package Overview
Dependencies
Maintainers
6
Versions
1175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@crave/farmblocks-stepper

A React Component for displaying step to step actions

  • 3.0.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
133
increased by37.11%
Maintainers
6
Weekly downloads
 
Created
Source

logo-farmblocks

Farmblocks-Stepper

A React component for displaying step to step actions. See Storybook

Installation

npm install @crave/farmblocks-stepper

Design Spec

See it on zeplin

image

Usage

Pass a list of steps to be completed, the quantity of completedSteps and a function to handle onClick.

The Stepper component will render:

  • COMPLETED status from index 0 of the steps array until the index of the last completed step (completedSteps - 1);
  • CURRENT status to the next step after the last completed step
  • PENDING status to all remaining steps

onClick will be called only for CURRENT steps.

const React = require("react");
const ReactDOM = require("react-dom");
const Stepper = require("@crave/farmblocks-stepper").default;
const { statusTypes } = require("@crave/farmblocks-stepper");

const root = document.createElement("div");

const steps = [
  "Complete profile",
  "Add bank account",
  "Connect to purchasers",
  "Add products",
  "Start selling"
];

const completedSteps = 2;

ReactDOM.render(
  <Stepper steps={steps} completedSteps={completedSteps} onClick={({index, value}) => console.log("Handle click", index, value)} />,
  root
);

document.body.appendChild(root);

API

See it in the source

License

MIT

Keywords

FAQs

Package last updated on 10 Feb 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc