New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

sg-inputs

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sg-inputs

Input Controls

latest
npmnpm
Version
1.1.15
Version published
Maintainers
1
Created
Source

sg-inputs

Input Controls

NPM JavaScript Style Guide

Install

npm install --save sg-inputs

Usage

import React, { Component } from 'react';
import {Dropdown} from 'sg-inputs';

class Example extends Component {

  dropdownChange(value){
	console.log(value);
  }

  render () {
	const items = [{id:1,text:'text'},{id:2,text:'text 2'}];
    return (
		<div>
			{ //the value is a property of the objects in items }
			<Dropdown items={items} valueProperty='id' displayProperty='text' offerSelect={true} dropdownChange={this.dropdownChange} />
			
			{ // the value is the object in items }
			<Dropdown items={items} valueProperty='id' displayProperty='self' offerSelect={true} dropdownChange={this.dropdownChange} />
		</div>
    );
  }
}

License

MIT ©

FAQs

Package last updated on 06 May 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