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

react-component-time-input

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-component-time-input

A datepicker component written in React.

latest
Source
npmnpm
Version
0.9.2
Version published
Maintainers
1
Created
Source

React Component TimeInput

npm version

Usage

npm install react-component-time-input

Then you can import or require with your preferred module builder.

import { TimeInputText, TimeInputListBox } from 'react-component-time-input';

Or

var reactTimeInput = require('react-component-time-input');

var TimeInputListBox = reactTimeInput.TimeInputListBox;

An example in es2015 and jsx:

import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { connect } from 'react-redux';

import { TimeInputText, TimeInputListBox } from '../timeinput/index';

function mapStateToProps(state) {
  return {
    hours: state.time.hours,
    minutes: state.time.minutes,
    seconds: state.time.seconds
  };
}

class App extends Component {

  render() {
    console.log('App this.props: ', this.props);
    const { updateTime } = this.props;

    return (
      <div>
        <section id={'time-input-text'}>
          <span>Text Time Input</span>
          <TimeInputText {...this.props}/>
        </section>
        <section id={'time-input-list-box'}>
          <div>ListBox Time Input</div>
          <TimeInputListBox {...this.props} timeStep={5} onChange={updateTime} useTwelveHourTime/>
        </section>
      </div>
    );
  }
}

export default connect(mapStateToProps)(App);

Keywords

react

FAQs

Package last updated on 08 Dec 2015

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