Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { PropTypes, Component } from 'react'
- class InputGmaps extends Component {
- constructor(props) {
- super(props);
- console.log('gmaps');
- }
- onChange = (event) => {
- console.log(event.target.value);
- }
- static propTypes = {
- type: PropTypes.string,
- onChange: PropTypes.func,
- name: PropTypes.string,
- value: PropTypes.string,
- placeholder: PropTypes.string,
- size: PropTypes.string
- };
- static defaultProps = {
- type: "text",
- onChange: "exec",
- name: "name",
- placeholder: "Placeholder",
- value: null,
- size:"big"
- };
- render() {
- return (
- <input
- id={'autocomplete'}
- type={this.props.type}
- name={this.props.name}
- placeholder={this.props.placeholder}
- value={this.props.value}
- onChange={this.onChange}
- className={'inputGmaps-'+this.props.size}
- />
- )
- }
- }
- export default InputGmaps
Advertisement
Add Comment
Please, Sign In to add comment