mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
#23 added heroic lab icon
This commit is contained in:
parent
971e222d6b
commit
462c27ee89
2 changed files with 18 additions and 2 deletions
|
@ -3,6 +3,9 @@ import { INode } from '~/redux/types';
|
|||
import styles from './styles.module.scss';
|
||||
import { URLS } from '~/constants/urls';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Group } from '~/components/containers/Group';
|
||||
import { Icon } from '~/components/input/Icon';
|
||||
import Tippy from '@tippy.js/react';
|
||||
|
||||
interface IProps {
|
||||
node: INode;
|
||||
|
@ -12,11 +15,19 @@ const LabNodeTitle: FC<IProps> = ({ node }) => {
|
|||
if (!node.title) return null;
|
||||
|
||||
return (
|
||||
<div className={styles.wrap}>
|
||||
<Group horizontal className={styles.wrap}>
|
||||
<div className={styles.title}>
|
||||
<Link to={URLS.NODE_URL(node.id)}>{node.title || '...'}</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{node.is_heroic && (
|
||||
<Tippy content="Важный пост">
|
||||
<div className={styles.star}>
|
||||
<Icon icon="star_full" />
|
||||
</div>
|
||||
</Tippy>
|
||||
)}
|
||||
</Group>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -22,3 +22,8 @@
|
|||
font: $font_20_semibold;
|
||||
}
|
||||
}
|
||||
|
||||
.star {
|
||||
fill: $yellow;
|
||||
flex: 0 0 24px;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue