From c60b7e5c53d348b07a72abe1ea60b1e989bdba8c Mon Sep 17 00:00:00 2001 From: Ilya Y <75578537+ilya-bkv@users.noreply.github.com> Date: Wed, 17 May 2023 07:04:38 +0300 Subject: [PATCH] Add tooltip to Article details (#98) * Add tooltip to Article details * Hide popover f SharePopup is visible --- src/components/Article/Article.module.scss | 5 +- src/components/Article/FullArticle.tsx | 75 +++++++++++++--------- src/components/Article/SharePopup.tsx | 13 +++- src/components/Feed/ArticleCard.tsx | 61 +++++++++++------- src/components/_shared/Popover/Popover.tsx | 29 +++++---- src/components/_shared/Popup/Popup.tsx | 2 +- 6 files changed, 113 insertions(+), 72 deletions(-) diff --git a/src/components/Article/Article.module.scss b/src/components/Article/Article.module.scss index 40f186bd..d3b75047 100644 --- a/src/components/Article/Article.module.scss +++ b/src/components/Article/Article.module.scss @@ -149,6 +149,7 @@ img { display: inline-block; margin: 0 3.2rem 1em 0; vertical-align: baseline; + cursor: pointer; .icon { height: 1.6em; @@ -194,10 +195,6 @@ img { margin-right: 0; } - .iconEdit { - margin-right: 0.3em; - } - &:hover { background: #000; diff --git a/src/components/Article/FullArticle.tsx b/src/components/Article/FullArticle.tsx index bf4beaa6..7559fee4 100644 --- a/src/components/Article/FullArticle.tsx +++ b/src/components/Article/FullArticle.tsx @@ -20,6 +20,7 @@ import { useLocalize } from '../../context/localize' import stylesHeader from '../Nav/Header.module.scss' import styles from './Article.module.scss' import { imageProxy } from '../../utils/imageProxy' +import { Popover } from '../_shared/Popover' interface ArticleProps { article: Shout @@ -213,39 +214,53 @@ export const FullArticle = (props: ArticleProps) => { {props.article.stat?.viewed} -