From 45e942a345fa28e0df1ce556ccb4a15a7cc5837d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bel=C3=A9n=20Curcio?= Date: Tue, 25 Sep 2018 14:13:54 -0300 Subject: [PATCH] Adding styling --- src/core/client/stream/components/App.css | 4 ++++ src/core/client/stream/components/App.tsx | 2 +- src/core/client/stream/components/HTMLContent.tsx | 9 +++++++-- .../stream/tabs/profile/components/HistoryComment.css | 5 +++++ .../stream/tabs/profile/components/HistoryComment.tsx | 8 +++++--- src/core/client/ui/components/Tabs/TabContent.tsx | 7 ++++++- 6 files changed, 28 insertions(+), 7 deletions(-) diff --git a/src/core/client/stream/components/App.css b/src/core/client/stream/components/App.css index 2bcabb67f..75246e7c6 100644 --- a/src/core/client/stream/components/App.css +++ b/src/core/client/stream/components/App.css @@ -14,3 +14,7 @@ .root { width: 100%; } + +.tabContent { + padding-top: var(--spacing-unit); +} diff --git a/src/core/client/stream/components/App.tsx b/src/core/client/stream/components/App.tsx index 4b9107bd6..8913855f4 100644 --- a/src/core/client/stream/components/App.tsx +++ b/src/core/client/stream/components/App.tsx @@ -30,7 +30,7 @@ const App: StatelessComponent = props => { Comments My Profile - + diff --git a/src/core/client/stream/components/HTMLContent.tsx b/src/core/client/stream/components/HTMLContent.tsx index 62bd62b78..a8d20c0ca 100644 --- a/src/core/client/stream/components/HTMLContent.tsx +++ b/src/core/client/stream/components/HTMLContent.tsx @@ -1,3 +1,4 @@ +import cn from "classnames"; import dompurify from "dompurify"; import React, { StatelessComponent } from "react"; @@ -5,11 +6,15 @@ import styles from "./HTMLContent.css"; interface HTMLContentProps { children: string; + className?: string; } -const HTMLContent: StatelessComponent = ({ children }) => ( +const HTMLContent: StatelessComponent = ({ + children, + className, +}) => (
); diff --git a/src/core/client/stream/tabs/profile/components/HistoryComment.css b/src/core/client/stream/tabs/profile/components/HistoryComment.css index 1c7b924fc..286faa81f 100644 --- a/src/core/client/stream/tabs/profile/components/HistoryComment.css +++ b/src/core/client/stream/tabs/profile/components/HistoryComment.css @@ -9,4 +9,9 @@ .sideBar { min-width: 180px; + padding-left: var(--spacing-unit); +} + +.body { + word-break: break-all; } diff --git a/src/core/client/stream/tabs/profile/components/HistoryComment.tsx b/src/core/client/stream/tabs/profile/components/HistoryComment.tsx index 2bfc6c096..d9520d112 100644 --- a/src/core/client/stream/tabs/profile/components/HistoryComment.tsx +++ b/src/core/client/stream/tabs/profile/components/HistoryComment.tsx @@ -27,10 +27,12 @@ const HistoryComment: StatelessComponent = props => { {props.comment.body && ( - {props.comment.body} + + {props.comment.body} + )} - + launch @@ -47,7 +49,7 @@ const HistoryComment: StatelessComponent = props => { schedule {props.comment.createdAt} - + {!!props.comment.replyCount && ( = props => { - const { children, activeTab } = props; + const { children, activeTab, className } = props; return ( <> {React.Children.toArray(children) @@ -18,6 +22,7 @@ const TabContent: StatelessComponent = props => { .map((child: React.ReactElement, i) => React.cloneElement(child, { tabId: child.props.tabId ? child.props.tabId : i, + className, }) )}