Sha256: 30c11e5a066eb516373a0363b91c92a08367cd239d894437f601f6f32c7f6ea8
Contents?: true
Size: 580 Bytes
Versions: 19
Compression:
Stored size: 580 Bytes
Contents
import PropTypes from 'prop-types'; import React from 'react'; import style from './HelloWorld.module.css'; const HelloWorld = ({ name, updateName }) => ( <div> <h3> Hello, {name}! </h3> <hr /> <form> <label className={style.bright} htmlFor="name"> Say hello to: <input id="name" type="text" value={name} onChange={(e) => updateName(e.target.value)} /> </label> </form> </div> ); HelloWorld.propTypes = { name: PropTypes.string.isRequired, updateName: PropTypes.func.isRequired, }; export default HelloWorld;
Version data entries
19 entries across 19 versions & 1 rubygems