blob: d2238afacb34cdc71bbad4b9da7c87a857946f61 (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
import React from 'react';
import CharLimit from './CharLimit'
import styled from 'styled-components'
const CharLimitContainer = styled.div`
position: relative;
`
class TitleInput extends React.Component {
render() {
return (
<CharLimitContainer>
<input
name="title"
className="lt-shadow"
placeholder="Title"
type="text"
autoComplete="off"
onChange={this.props.onChange}
value={this.props.value} />
<CharLimit
content={this.props.value}
maxLength={this.props.maxLength} />
</CharLimitContainer>
);
}
}
class PasteInput extends React.Component {
render() {
return (
<CharLimitContainer>
<textarea
name="content"
placeholder="Paste your text here"
value={this.props.content}
onChange={this.props.onChange}
className="lt-shadow" />
<CharLimit
content={this.props.content}
maxLength={this.props.maxLength} />
</CharLimitContainer>
);
}
}
export { TitleInput, PasteInput }
|