Make useTooltip = true by default in Queryable

This commit is contained in:
M. Mert Yildiran 2021-11-29 10:42:27 +03:00
parent 2ca16a0b81
commit a0a4452bf0
No known key found for this signature in database
GPG Key ID: D42ADB236521BF7A
3 changed files with 5 additions and 6 deletions

View File

@ -13,7 +13,7 @@ interface Props {
flipped?: boolean, flipped?: boolean,
} }
const Queryable: React.FC<Props> = ({query, updateQuery, style, className, useTooltip= false, displayIconOnMouseOver = false, flipped = false, children}) => { const Queryable: React.FC<Props> = ({query, updateQuery, style, className, useTooltip= true, displayIconOnMouseOver = false, flipped = false, children}) => {
const [showAddedNotification, setAdded] = useState(false); const [showAddedNotification, setAdded] = useState(false);
const [showTooltip, setShowTooltip] = useState(false); const [showTooltip, setShowTooltip] = useState(false);
@ -53,7 +53,7 @@ const Queryable: React.FC<Props> = ({query, updateQuery, style, className, useTo
{flipped && addButton} {flipped && addButton}
{children} {children}
{!flipped && addButton} {!flipped && addButton}
{useTooltip && showTooltip && <span className={'Queryable-AddNotifier'}></span>} {useTooltip && showTooltip && <span className={'Queryable-AddNotifier'}>{query}</span>}
</div> </div>
); );
}; };

View File

@ -11,14 +11,12 @@ interface SummaryProps {
export const Summary: React.FC<SummaryProps> = ({method, summary, updateQuery}) => { export const Summary: React.FC<SummaryProps> = ({method, summary, updateQuery}) => {
const methodChild = <span const methodChild = <span>
className={`queryable`}
>
{method} {method}
</span> </span>
const summaryChild = <div const summaryChild = <div
className={`queryable ${styles.summary}`} className={`${styles.summary}`}
> >
{summary} {summary}
</div> </div>

View File

@ -34,4 +34,5 @@
transform: translate(0, -80%) transform: translate(0, -80%)
color: white color: white
z-index: 1000 z-index: 1000
font-size: 11px