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

horizontal-stepper

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

horizontal-stepper

A well designed ReactJs component in-box stepper

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

horizontal-stepper

horizontal-stepper is a simple stepper component using react, which takes an array of steps title and a function that returns the body to be displayed in the stepper at every step. Input - 1) steps title in string array 2) stepContent function that returns the body to be displayed in the stepper at every step.

Installation

yarn add horizontal-stepper

Usage

import React, { Component } from 'react';
import './App.css';
import Stepper from 'anandd';

class App extends Component {

  steps = [{ title: 'First Step' }, { title: 'Second Step' }, { title: 'Third Step' }, { title: 'Fourth Step' }];

  getStepContent = (step) => {
    switch (step) {
      case 0:
        return <div>First Step</div>
      case 1:
        return <div>Second Step</div>
      case 2:
        return <div>Third Step</div>
      case 3:
        return <div>Fourth Step</div>
      default:
        return "Unknown step";
    }
  }

  render() {
    return (
      <div className="App">
        <Stepper steps={this.steps} stepContent={this.getStepContent}/>
      </div>
    );
  }
}

export default App;

Development

yarn
yarn dev

Test

yarn test

Build

yarn
yarn build

Publish

npm login
npm version patch
git add -A
git push origin master
npm publish

Keywords

FAQs

Package last updated on 20 Dec 2019

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