Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce input change handlers in PokemonCard #7

Open
marktani opened this issue Mar 5, 2017 · 0 comments
Open

Introduce input change handlers in PokemonCard #7

marktani opened this issue Mar 5, 2017 · 0 comments
Assignees

Comments

@marktani
Copy link
Collaborator

marktani commented Mar 5, 2017

  handleNameChange = e => {
    this.setState({name:e.target.value})
  }
  
  handleUrlChange = e => {
    this.setState({url:e.target.value})
  }
  render () {
    return (
      <div className='w-100 pa4 flex justify-center'>
        <Card style={{ maxWidth: 400 }}>
          <input
            className='w-100 pa3 mv2'
            value={this.state.name}
            placeholder='Name'
            onChange={this.handleNameChange}
          />
          <input
            className='w-100 pa3 mv2'
            value={this.state.url}
            placeholder='Image Url'
            onChange={this.handleUrlChange}
          />
// ...
@marktani marktani self-assigned this Mar 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant