react-fx-granularity-dd
v1.1.0
Published
React dropdown component list of forex Oanda granularities. e.g. H1,H4,D
Downloads
4
Readme
react-fx-granularity-dd
React dropdown component list of forex Oanda granularities. e.g. H1,H4,D
Install
npm install --save react-fx-granularity-dd
Usage
import React, { Component } from 'react'
import OandaGranularityDD from 'react-fx-granularity-dd'
export default class App extends Component {
constructor(props) {
super(props);
this.state = {
instrument: '',
granularity: 'H4'
}
this.handleChangeEvent = this.handleChangeEvent.bind(this);
}
handleChangeEvent(e) {
const { name, value } = e.target;
this.setState({
[name]: value
});
}
render () {
const { granularity } = this.state;
return (
<div>
<OandaGranularityDD granularity={granularity} onChangeEvent={this.handleChangeEvent} />
</div>
)
}
}
License
MIT © fespiritu