diff --git a/src/core/client/ui/components/FormField/FormField.css b/src/core/client/ui/components/FormField/FormField.css index b1521ed5d..88de80d08 100644 --- a/src/core/client/ui/components/FormField/FormField.css +++ b/src/core/client/ui/components/FormField/FormField.css @@ -1,14 +1,3 @@ .root { - display: flex; - flex-direction: column; width: 100%; - justify-content: space-between; - - &.halfItemGutter > * { - margin-left: calc(0.5 * var(--spacing-unit)) !important; - } - - &.itemGutter > * { - margin-top: var(--spacing-unit) !important; - } } diff --git a/src/core/client/ui/components/FormField/FormField.mdx b/src/core/client/ui/components/FormField/FormField.mdx index 055bc30f8..6005da178 100644 --- a/src/core/client/ui/components/FormField/FormField.mdx +++ b/src/core/client/ui/components/FormField/FormField.mdx @@ -16,7 +16,7 @@ FormField manages the gutters between inner elements. It's a form field wrapper Username A unique identifier displayed on your comments. You may use “_” and “.” - + Invalid characters. Try again. diff --git a/src/core/client/ui/components/FormField/FormField.tsx b/src/core/client/ui/components/FormField/FormField.tsx index fe5b6dd7b..be9c78554 100644 --- a/src/core/client/ui/components/FormField/FormField.tsx +++ b/src/core/client/ui/components/FormField/FormField.tsx @@ -4,6 +4,7 @@ import { StatelessComponent } from "react"; import { withStyles } from "talk-ui/hocs"; +import Flex from "../Flex"; import * as styles from "./FormField.css"; interface InnerProps { @@ -17,21 +18,15 @@ interface InnerProps { const FormField: StatelessComponent = props => { const { classes, className, children, itemGutter, ...rest } = props; - // TODO (bc): Use flex component once the extra div issue is solved. return ( -
{children} -
+ ); }; diff --git a/src/docs/forms.mdx b/src/docs/forms.mdx index 2fe5dc191..cfd1ab523 100644 --- a/src/docs/forms.mdx +++ b/src/docs/forms.mdx @@ -14,29 +14,29 @@ import { InputLabel, CallOut, ValidationMessage, TextField, InputDescription, Fl ## Simple Form - + Sign up to join the conversation Email Address - + Username A unique identifier displayed on your comments. You may use “_” and “.” - + Password Must be at least 8 characters - + Confirm Password - + @@ -46,31 +46,31 @@ import { InputLabel, CallOut, ValidationMessage, TextField, InputDescription, Fl ## Simple Form with error - + Sign up to join the conversation Email Address - + Username A unique identifier displayed on your comments. You may use “_” and “.” - - Invalid characters. Try again. + + Invalid characters. Try again. Password Must be at least 8 characters - + Confirm Password - + @@ -80,30 +80,30 @@ import { InputLabel, CallOut, ValidationMessage, TextField, InputDescription, Fl ## Simple Form with CallOut - + Sign up to join the conversation The email address or password you entered is incorrect. Try again Email Address - + Username A unique identifier displayed on your comments. You may use “_” and “.” - + Password Must be at least 8 characters - + Confirm Password - +