diff --git a/src/core/client/auth/components/SignUp.tsx b/src/core/client/auth/components/SignUp.tsx index 44eaaf70f..49cce2aa1 100644 --- a/src/core/client/auth/components/SignUp.tsx +++ b/src/core/client/auth/components/SignUp.tsx @@ -32,7 +32,9 @@ const SignUp: StatelessComponent = props => { Password - Must be at least 8 characters + + Must be at least 8 characters + diff --git a/src/core/client/stream/components/App.tsx b/src/core/client/stream/components/App.tsx index f5f4262f7..a09c49149 100644 --- a/src/core/client/stream/components/App.tsx +++ b/src/core/client/stream/components/App.tsx @@ -22,7 +22,6 @@ const App: StatelessComponent = props => { {view} ); - // return
{view}
; }; export default App; diff --git a/src/core/client/stream/components/PostCommentForm.css b/src/core/client/stream/components/PostCommentForm.css index e813f4ea7..7a8ffebee 100644 --- a/src/core/client/stream/components/PostCommentForm.css +++ b/src/core/client/stream/components/PostCommentForm.css @@ -1,15 +1,18 @@ .root { width: 100%; + padding-bottom: var(--spacing-unit); } .textarea { composes: bodyCopy from "talk-ui/shared/typography.css"; - display: block; - height: 100px; + height: 150px; width: 100%; box-sizing: border-box; margin-bottom: var(--spacing-unit); + padding: var(--spacing-unit); + border-radius: var(--round-corners); + resize: vertical; } .postButtonContainer { diff --git a/src/core/client/stream/components/PostCommentForm.tsx b/src/core/client/stream/components/PostCommentForm.tsx index 72bc0ad70..c90c56b96 100644 --- a/src/core/client/stream/components/PostCommentForm.tsx +++ b/src/core/client/stream/components/PostCommentForm.tsx @@ -15,6 +15,7 @@ interface FormProps { export interface PostCommentFormProps { onSubmit: OnSubmit; + signedIn: boolean; } const PostCommentForm: StatelessComponent = props => ( @@ -29,6 +30,7 @@ const PostCommentForm: StatelessComponent = props => ( name={input.name} onChange={input.onChange} value={input.value} + placeholder="Post a comment" /> {meta.touched && (meta.error || meta.submitError) && ( @@ -40,11 +42,23 @@ const PostCommentForm: StatelessComponent = props => ( )}
- - + + ) : ( + - + )}
)} diff --git a/src/core/client/stream/components/UserBoxUnauthenticated.tsx b/src/core/client/stream/components/UserBoxUnauthenticated.tsx index 323b0acf5..f1a8716ee 100644 --- a/src/core/client/stream/components/UserBoxUnauthenticated.tsx +++ b/src/core/client/stream/components/UserBoxUnauthenticated.tsx @@ -15,7 +15,7 @@ const UserBoxUnauthenticated: StatelessComponent< UserBoxUnauthenticatedProps > = props => { return ( - + { return undefined; }; public render() { - return ; + return ; } } diff --git a/src/core/client/ui/components/InputDescription/InputDescription.css b/src/core/client/ui/components/InputDescription/InputDescription.css new file mode 100644 index 000000000..c3a2af639 --- /dev/null +++ b/src/core/client/ui/components/InputDescription/InputDescription.css @@ -0,0 +1,2 @@ +.root { +} diff --git a/src/core/client/ui/components/InputDescription/InputDescription.mdx b/src/core/client/ui/components/InputDescription/InputDescription.mdx new file mode 100644 index 000000000..3dc055085 --- /dev/null +++ b/src/core/client/ui/components/InputDescription/InputDescription.mdx @@ -0,0 +1,36 @@ +--- +name: FormField +menu: UI Kit +--- + +import { Playground, PropsTable } from 'docz' +import FormField from './FormField' +import { InputLabel, ValidationMessage, TextField, Typography, Flex, Button} from '../core/client/ui/components' + +# Flex + +`FormField` is to be used with Form Components `flexbox`. + +## Justify content + + + + + +## Align items + + + + + + + + +## Direction + + + + + + + diff --git a/src/core/client/ui/components/InputDescription/InputDescription.tsx b/src/core/client/ui/components/InputDescription/InputDescription.tsx new file mode 100644 index 000000000..fe5b6dd7b --- /dev/null +++ b/src/core/client/ui/components/InputDescription/InputDescription.tsx @@ -0,0 +1,43 @@ +import cn from "classnames"; +import React, { ReactNode } from "react"; +import { StatelessComponent } from "react"; + +import { withStyles } from "talk-ui/hocs"; + +import * as styles from "./FormField.css"; + +interface InnerProps { + children: ReactNode; + classes: typeof styles; + id?: string; + className?: string; + itemGutter?: boolean | "half"; +} + +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} +
+ ); +}; + +FormField.defaultProps = { + itemGutter: true, +}; + +const enhanced = withStyles(styles)(FormField); +export default enhanced; diff --git a/src/core/client/ui/components/InputDescription/index.ts b/src/core/client/ui/components/InputDescription/index.ts new file mode 100644 index 000000000..6fd0949a5 --- /dev/null +++ b/src/core/client/ui/components/InputDescription/index.ts @@ -0,0 +1 @@ +export { default } from "./InputDescription"; diff --git a/src/core/client/ui/shared/typography.css b/src/core/client/ui/shared/typography.css index a4abd6426..c688bdf1a 100644 --- a/src/core/client/ui/shared/typography.css +++ b/src/core/client/ui/shared/typography.css @@ -161,7 +161,7 @@ .inputDescription { font-size: calc(14rem / var(--rem-base)); - font-weight: var(--font-weight-medium); + font-weight: var(--font-weight-regular); font-family: var(--font-family); line-height: calc(18em / 16); letter-spacing: calc(0.2em / 16); diff --git a/src/locales/de/stream.ftl b/src/locales/de/stream.ftl index c4eb3040a..6031e6c5d 100644 --- a/src/locales/de/stream.ftl +++ b/src/locales/de/stream.ftl @@ -2,6 +2,6 @@ ## Comments Tab -comments-postCommentForm-post = Posten +comments-postCommentForm-submit = Posten comments-stream-loadMore = Mehr laden comments-replyList-showAll = Alle anzeigen diff --git a/src/locales/en-US/stream.ftl b/src/locales/en-US/stream.ftl index 01a2ed331..6e04fcc54 100644 --- a/src/locales/en-US/stream.ftl +++ b/src/locales/en-US/stream.ftl @@ -2,7 +2,7 @@ ## Comments Tab -comments-postCommentForm-post = Post +comments-postCommentForm-submit = Submit comments-stream-loadMore = Load more comments-replyList-showAll = Show all