Changes added

This commit is contained in:
Belen Curcio
2018-08-06 11:49:45 -03:00
parent b32553ef00
commit 11ba91c20e
3 changed files with 27 additions and 9 deletions
@@ -29,10 +29,22 @@ export interface TextFieldProps {
* If set renders a full width button
*/
fullWidth?: boolean;
/**
* Placeholder
*/
placeholder?: string;
}
const TextField: StatelessComponent<TextFieldProps> = props => {
const { className, classes, color, fullWidth, value, ...rest } = props;
const {
className,
classes,
color,
fullWidth,
value,
placeholder,
...rest
} = props;
const rootClassName = cn(
classes.root,
@@ -44,12 +56,20 @@ const TextField: StatelessComponent<TextFieldProps> = props => {
className
);
return <input className={rootClassName} value={value} {...rest} />;
return (
<input
className={rootClassName}
placeholder={placeholder}
value={value}
{...rest}
/>
);
};
TextField.defaultProps = {
color: "regular",
fullWidth: false,
placeholder: "",
};
const enhanced = withStyles(styles)(TextField);