mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
refactored node header
This commit is contained in:
parent
6e0c9af647
commit
507bb452bb
4 changed files with 23 additions and 23 deletions
|
@ -1,5 +1,4 @@
|
||||||
import React, { FC, memo } from 'react';
|
import React, { FC, memo } from 'react';
|
||||||
import styles from './styles.module.scss';
|
|
||||||
import { INode } from '~/redux/types';
|
import { INode } from '~/redux/types';
|
||||||
import { NodePanelInner } from '~/components/node/NodePanelInner';
|
import { NodePanelInner } from '~/components/node/NodePanelInner';
|
||||||
import { useNodePermissions } from '~/utils/hooks/node/useNodePermissions';
|
import { useNodePermissions } from '~/utils/hooks/node/useNodePermissions';
|
||||||
|
@ -16,7 +15,6 @@ const NodePanel: FC<IProps> = memo(({ node, isLoading }) => {
|
||||||
const { onEdit, onLike, onStar, onLock } = useNodeActions(node);
|
const { onEdit, onLike, onStar, onLock } = useNodeActions(node);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.place}>
|
|
||||||
<NodePanelInner
|
<NodePanelInner
|
||||||
node={node}
|
node={node}
|
||||||
onEdit={onEdit}
|
onEdit={onEdit}
|
||||||
|
@ -28,7 +26,6 @@ const NodePanel: FC<IProps> = memo(({ node, isLoading }) => {
|
||||||
canStar={can_star}
|
canStar={can_star}
|
||||||
isLoading={!!isLoading}
|
isLoading={!!isLoading}
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}, shallowEqual);
|
}, shallowEqual);
|
||||||
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
@import "src/styles/variables";
|
|
||||||
|
|
||||||
.place {
|
|
||||||
@include row_shadow;
|
|
||||||
position: relative;
|
|
||||||
z-index: 3;
|
|
||||||
margin-top: -$radius;
|
|
||||||
}
|
|
|
@ -55,7 +55,9 @@ const NodeLayout: FC<IProps> = memo(
|
||||||
<Card className={styles.node} seamless>
|
<Card className={styles.node} seamless>
|
||||||
{block}
|
{block}
|
||||||
|
|
||||||
|
<div className={styles.panel}>
|
||||||
<NodePanel node={current} isLoading={is_loading} />
|
<NodePanel node={current} isLoading={is_loading} />
|
||||||
|
</div>
|
||||||
|
|
||||||
<NodeBottomBlock
|
<NodeBottomBlock
|
||||||
canEdit={canEdit}
|
canEdit={canEdit}
|
||||||
|
|
|
@ -49,3 +49,12 @@
|
||||||
border-radius: $panel_radius;
|
border-radius: $panel_radius;
|
||||||
box-shadow: $comment_shadow;
|
box-shadow: $comment_shadow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.panel {
|
||||||
|
@include row_shadow;
|
||||||
|
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-end;
|
||||||
|
justify-content: stretch;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue