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

banded-payment-slider

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

banded-payment-slider

A React component for banded payment slider

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by100%
Maintainers
0
Weekly downloads
 
Created
Source

React-Banded-Payment-Slider

A React component for banded payment slider

Installation

npm install banded-payment-slider

Usage

import React from 'react';
import BandedPaymentSlider from 'banded-payment-slider';

const App = () => {
  const initialBands = [
    { from: 0, to: 50, percentage: 50 },
    { from: 50, to: 100, percentage: 100 },
  ];

  const handleBandsChange = (newBands) => {
    console.log('Bands updated:', newBands);
  };

  return (
    <BandedPaymentSlider
      bands={initialBands}
      onBandsChange={handleBandsChange}
      labels={{ percentage_paid: "Percentage Paid", delete_band: "Delete Band"}}
    />
  );
};

export default App;
PropTypeDescription
bandsArray<{ from: number, to: number, percentage: number }>An array of band objects, each representing a range and percentage.
onBandsChange(bands: Array<{ from: number, to: number, percentage: number }>) => voidA callback function that receives the updated bands array when changes occur.
labels{ percentage_paid: string, delete_band: string }An object containing custom labels for the component. Use this to override default text or provide translations.

Build This Package

Run the build script:

npm run build

License MIT © [Your Name]

Keywords

FAQs

Package last updated on 09 Oct 2024

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