diff --git a/src/core/client/stream/components/Comment/Comment.tsx b/src/core/client/stream/components/Comment/Comment.tsx index dc5974b65..a323777d0 100644 --- a/src/core/client/stream/components/Comment/Comment.tsx +++ b/src/core/client/stream/components/Comment/Comment.tsx @@ -23,7 +23,9 @@ const Comment: StatelessComponent = props => { {props.createdAt} {props.body} - Hello + + Invalid characters. Try again + ); }; diff --git a/src/core/client/ui/components/Icon/Icon.tsx b/src/core/client/ui/components/Icon/Icon.tsx index 3b8889fa1..650a00a73 100644 --- a/src/core/client/ui/components/Icon/Icon.tsx +++ b/src/core/client/ui/components/Icon/Icon.tsx @@ -13,7 +13,7 @@ interface InnerProps extends HTMLAttributes { */ classes: typeof styles; - size?: "sm" | "md" | "lg" | "xl"; + size?: "xsm" | "sm" | "md" | "lg" | "xl"; /** The name of the icon to render */ children: string; diff --git a/src/core/client/ui/components/ValidationMessage/ValidationMessage.css b/src/core/client/ui/components/ValidationMessage/ValidationMessage.css index 1553c5969..9decc5580 100644 --- a/src/core/client/ui/components/ValidationMessage/ValidationMessage.css +++ b/src/core/client/ui/components/ValidationMessage/ValidationMessage.css @@ -1,6 +1,11 @@ .root { composes: validationMessage from "talk-ui/shared/typography.css"; - padding: 4px; + position: relative; + display: inline-flex; + justify-content: flex-start; + align-items: center; + padding: 7px 10px; + box-sizing: border-box; } .colorRegular { @@ -18,6 +23,12 @@ color: var(--palette-common-white); } +.fullWidth { + display: block; + width: 100%; + box-sizing: border-box; +} + .icon { margin-right: 8px; } diff --git a/src/core/client/ui/components/ValidationMessage/ValidationMessage.mdx b/src/core/client/ui/components/ValidationMessage/ValidationMessage.mdx index 0f0e2fb90..0fb2e9936 100644 --- a/src/core/client/ui/components/ValidationMessage/ValidationMessage.mdx +++ b/src/core/client/ui/components/ValidationMessage/ValidationMessage.mdx @@ -14,6 +14,7 @@ import Account with this email address already exists. Try another email Please enter a valid email address Invalid characters. Try again + Invalid characters. Try againz diff --git a/src/core/client/ui/components/ValidationMessage/ValidationMessage.tsx b/src/core/client/ui/components/ValidationMessage/ValidationMessage.tsx index b9552cb0b..592ca71fb 100644 --- a/src/core/client/ui/components/ValidationMessage/ValidationMessage.tsx +++ b/src/core/client/ui/components/ValidationMessage/ValidationMessage.tsx @@ -22,16 +22,21 @@ interface InnerProps { * Color of the ValidationMessage */ color?: "regular" | "error"; + /* + * If set renders a full width button + */ + fullWidth?: boolean; } const ValidationMessage: StatelessComponent = props => { - const { className, classes, color, children, ...rest } = props; + const { className, classes, color, fullWidth, children, ...rest } = props; const rootClassName = cn( classes.root, { [classes.colorRegular]: color === "regular", [classes.colorError]: color === "error", + [classes.fullWidth]: fullWidth, }, className ); @@ -39,7 +44,7 @@ const ValidationMessage: StatelessComponent = props => { return (
{color === "error" && ( - + warning )} @@ -50,6 +55,7 @@ const ValidationMessage: StatelessComponent = props => { ValidationMessage.defaultProps = { color: "regular", + fullWidth: false, }; const enhanced = withStyles(styles)(ValidationMessage);