Validate input fields
Summary: Adds basic non-empty validation to title and description. Reviewed By: mweststrate Differential Revision: D18762778 fbshipit-source-id: 4bdbb550f4e740d399fbeaa9fb8170b801fc500e
This commit is contained in:
committed by
Facebook Github Bot
parent
bb6a7c50cd
commit
d791814dfa
@@ -11,8 +11,20 @@ import styled from 'react-emotion';
|
||||
import {inputStyle} from './Input';
|
||||
|
||||
const Textarea = styled('textarea')(
|
||||
({compact, readOnly}: {compact?: boolean; readOnly?: boolean}) => ({
|
||||
...inputStyle(compact || false, readOnly || false),
|
||||
({
|
||||
compact,
|
||||
readOnly,
|
||||
valid,
|
||||
}: {
|
||||
compact?: boolean;
|
||||
readOnly?: boolean;
|
||||
valid?: boolean;
|
||||
}) => ({
|
||||
...inputStyle({
|
||||
compact: compact || false,
|
||||
readOnly: readOnly || false,
|
||||
valid: valid !== false,
|
||||
}),
|
||||
lineHeight: 'normal',
|
||||
padding: compact ? '5px' : '8px',
|
||||
resize: 'none',
|
||||
|
||||
Reference in New Issue
Block a user