mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-26 05:16:41 +07:00
added hoverable hints
This commit is contained in:
parent
c888f13c60
commit
f5ca735049
7 changed files with 278 additions and 29 deletions
|
@ -1,5 +1,6 @@
|
|||
import React, { FC, ReactElement } from 'react';
|
||||
|
||||
import { Hoverable } from '~/components/common/Hoverable';
|
||||
import { SubTitle } from '~/components/common/SubTitle';
|
||||
import { Group } from '~/components/containers/Group';
|
||||
import { NodeRelatedItem } from '~/components/node/NodeRelatedItem';
|
||||
|
@ -7,7 +8,6 @@ import { INode } from '~/types';
|
|||
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
|
||||
interface IProps {
|
||||
title: ReactElement | string;
|
||||
items: Partial<INode>[];
|
||||
|
@ -19,8 +19,10 @@ const NodeRelated: FC<IProps> = ({ title, items }) => {
|
|||
<SubTitle className={styles.title}>{title}</SubTitle>
|
||||
|
||||
<div className={styles.grid}>
|
||||
{items.map(item => (
|
||||
<NodeRelatedItem item={item} key={item.id} />
|
||||
{items.map((item) => (
|
||||
<Hoverable key={item.id}>
|
||||
<NodeRelatedItem item={item} />
|
||||
</Hoverable>
|
||||
))}
|
||||
</div>
|
||||
</Group>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { FC, memo, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { FC, memo, useEffect, useMemo, useRef, useState } from 'react';
|
||||
|
||||
import classNames from 'classnames';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue