diff --git a/src/components/containers/Card/index.tsx b/src/components/containers/Card/index.tsx index 41b55257..17aa681b 100644 --- a/src/components/containers/Card/index.tsx +++ b/src/components/containers/Card/index.tsx @@ -7,8 +7,12 @@ type IProps = React.HTMLAttributes & {} const Card: FC = ({ className, children, + ...props }) => ( -
+
{children}
); diff --git a/src/components/node/Comment/index.tsx b/src/components/node/Comment/index.tsx index af130b9a..31f1646a 100644 --- a/src/components/node/Comment/index.tsx +++ b/src/components/node/Comment/index.tsx @@ -1,18 +1,28 @@ -import React, { FC } from 'react'; +import React, {FC, HTMLAttributes} from 'react'; import { Card } from "~/components/containers/Card"; import * as styles from './styles.scss'; +import classNames = require("classnames"); -interface IProps {} +type IProps = HTMLAttributes & { + is_empty?: boolean; + is_loading?: boolean; +} -const Comment: FC = () => ( - +const Comment: FC = ({ + is_empty, + is_loading, + className, + ...props +}) => ( +
-
- Lorem Ipsum -
+
); diff --git a/src/components/node/Comment/styles.scss b/src/components/node/Comment/styles.scss index ab64f657..366ba723 100644 --- a/src/components/node/Comment/styles.scss +++ b/src/components/node/Comment/styles.scss @@ -1,8 +1,12 @@ .wrap { background: $comment_bg; - min-height: 200px; + min-height: 64px; display: flex; box-shadow: $comment_shadow; + + &:global(.is_empty) { + opacity: 0.5; + } } .text { diff --git a/src/components/node/NodeNoComments/index.tsx b/src/components/node/NodeNoComments/index.tsx new file mode 100644 index 00000000..1dbaf278 --- /dev/null +++ b/src/components/node/NodeNoComments/index.tsx @@ -0,0 +1,16 @@ +import React, { FC } from "react"; +import { Comment } from "~/components/node/Comment"; +import * as styles from './styles.scss'; +import {Group} from "~/components/containers/Group"; + +interface IProps {} + +const NodeNoComments: FC = () => ( + + + + + +); + +export { NodeNoComments }; diff --git a/src/components/node/NodeNoComments/styles.scss b/src/components/node/NodeNoComments/styles.scss new file mode 100644 index 00000000..98607aad --- /dev/null +++ b/src/components/node/NodeNoComments/styles.scss @@ -0,0 +1,6 @@ +.wrap { + height: 300px; + overflow: hidden; + + @include after_shade($node_bg); +} diff --git a/src/containers/examples/ImageExample/index.tsx b/src/containers/examples/ImageExample/index.tsx index 2ab6b051..c1b897d2 100644 --- a/src/containers/examples/ImageExample/index.tsx +++ b/src/containers/examples/ImageExample/index.tsx @@ -9,6 +9,7 @@ import { NodePanel } from "~/components/node/NodePanel"; import { NodeRelated } from "~/components/node/NodeRelated"; import { Tags } from "~/components/node/Tags"; import { MenuButton } from "~/components/node/MenuButton"; +import { NodeNoComments } from "~/components/node/NodeNoComments"; interface IProps {} @@ -26,6 +27,8 @@ const ImageExample: FC = () => ( + + { range(1,6).map(el => (