* Make changes to editor * Make minor fixes and console log removals * Fix test in article form * Adjust rspec test
21 lines
436 B
JavaScript
21 lines
436 B
JavaScript
import { h } from 'preact';
|
|
import PropTypes from 'prop-types';
|
|
|
|
const Title = ({ onChange, defaultValue }) => (
|
|
<input
|
|
className="articleform__title"
|
|
type="text"
|
|
id="article-form-title"
|
|
placeholder="Title"
|
|
autocomplete="off"
|
|
value={defaultValue}
|
|
onChange={onChange}
|
|
/>
|
|
);
|
|
|
|
Title.propTypes = {
|
|
onChange: PropTypes.func.isRequired,
|
|
defaultValue: PropTypes.string.isRequired,
|
|
};
|
|
|
|
export default Title;
|