react-fx-instrument-dd
v1.1.2
Published
React dropdown component list of forex Oanda instruments
Downloads
3
Readme
react-fx-instrument-dd
React dropdown component list of forex Oanda instruments
Install
npm install --save react-fx-instrument-dd
Usage
import React, { Component } from 'react'
// import ExampleComponent from 'react-fx-instrument-dd'
import OandaInstrumentDD from 'react-fx-instrument-dd'
export default class App extends Component {
constructor(props) {
super(props);
this.state = {
instrument: 'NZD_USD'
};
this.onChangeEvent = this.onChangeEvent.bind(this);
}
onChangeEvent = (e) => {
const { name, value } = e.target;
this.setState({ [name]: value });
}
render () {
const { instrument } = this.state;
return (
<div>
<OandaInstrumentDD name="instrument" onChangeEvent={this.onChangeEvent} instrument={instrument} />
</div>
)
}
}
License
MIT © fespiritu