blob: 0a26d42e8135666cfa32b8ea4d7dab265e65186c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import CharLimit from "../decorators/CharLimit";
import React from "react";
import {Labelled} from "./shared";
import {Input} from "../Form/Input";
export const Text = React.forwardRef(({label, id, readOnly, onChange, value, maxLength, autoFocus}, ref) => {
return (
<Labelled label={label} value={value}>
<Input
ref={ref}
name={label}
readOnly={readOnly}
placeholder="Title"
id={id}
type="text"
autoFocus={autoFocus}
autoComplete="off"
onChange={onChange}
value={value} />
<CharLimit
content={value}
maxLength={maxLength} />
</Labelled>
);
})
|