textarea input
This commit is contained in:
parent
209f826c15
commit
4ce5ba6c1a
|
@ -68,6 +68,17 @@ LabelInput.propTypes = {
|
||||||
dispatch: PropTypes.func,
|
dispatch: PropTypes.func,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const LabelTextarea = ({ label, dispatch, ...props }) => (
|
||||||
|
<LabelInputContainer label={label}>
|
||||||
|
<intextarea {...props} />
|
||||||
|
</LabelInputContainer>
|
||||||
|
);
|
||||||
|
|
||||||
|
LabelTextarea.propTypes = {
|
||||||
|
label: FormPropTypes.label.isRequired,
|
||||||
|
dispatch: PropTypes.func,
|
||||||
|
};
|
||||||
|
|
||||||
export class SimpleInput extends ImmutablePureComponent {
|
export class SimpleInput extends ImmutablePureComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
|
@ -88,6 +99,26 @@ export class SimpleInput extends ImmutablePureComponent {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class SimpleTextarea extends ImmutablePureComponent {
|
||||||
|
|
||||||
|
static propTypes = {
|
||||||
|
label: FormPropTypes.label,
|
||||||
|
hint: PropTypes.node,
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { hint, ...props } = this.props;
|
||||||
|
const Input = this.props.label ? LabelTextarea : 'textarea';
|
||||||
|
|
||||||
|
return (
|
||||||
|
<InputContainer {...this.props}>
|
||||||
|
<Input {...props} />
|
||||||
|
</InputContainer>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
export class SimpleForm extends ImmutablePureComponent {
|
export class SimpleForm extends ImmutablePureComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
|
|
Loading…
Reference in New Issue