docbrown/app/javascript/listings/components/Title.jsx
Katie Davis 76453b41fb
Updates ESLint rules to error on default imports (#12512)
* add rule

* add named imports

* more missed files

* so many files
2021-02-02 10:24:03 -05:00

29 lines
662 B
JavaScript

import PropTypes from 'prop-types';
import { h } from 'preact';
const domId = 1;
export const Title = ({ onChange, defaultValue }) => (
<div className="crayons-field">
<label className="crayons-field__label" htmlFor={domId}>
Title
</label>
<input
type="text"
className="crayons-textfield"
id={domId}
name="listing[title]"
maxLength="128"
size="128"
placeholder="128 characters max, plain text"
autoComplete="off"
value={defaultValue}
onInput={onChange}
/>
</div>
);
Title.propTypes = {
onChange: PropTypes.func.isRequired,
defaultValue: PropTypes.string.isRequired,
};