mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
fixed flow cell angle
This commit is contained in:
parent
28441d7924
commit
95166a427f
2 changed files with 22 additions and 5 deletions
|
@ -55,11 +55,23 @@ const FlowCell: FC<Props> = ({
|
|||
|
||||
const shadeSize = useMemo(() => {
|
||||
const min = isMobile ? 10 : 15;
|
||||
const max = isMobile ? 20 : 50;
|
||||
const max = isMobile ? 20 : 40;
|
||||
|
||||
return withText ? min : max;
|
||||
}, [withText, isMobile]);
|
||||
|
||||
const shadeAngle = useMemo(() => {
|
||||
if (flow.display === 'vertical') {
|
||||
return 9;
|
||||
}
|
||||
|
||||
if (flow.display === 'horizontal') {
|
||||
return 15;
|
||||
}
|
||||
|
||||
return 7;
|
||||
}, [flow.display]);
|
||||
|
||||
return (
|
||||
<div className={classNames(styles.cell, styles[flow.display || 'single'])} ref={ref as any}>
|
||||
{canEdit && !isMenuActive && (
|
||||
|
@ -100,7 +112,9 @@ const FlowCell: FC<Props> = ({
|
|||
/>
|
||||
)}
|
||||
|
||||
<CellShade color={color} className={styles.shade} size={shadeSize} />
|
||||
{!!title && (
|
||||
<CellShade color={color} className={styles.shade} size={shadeSize} angle={shadeAngle} />
|
||||
)}
|
||||
|
||||
{!withText && (
|
||||
<div className={styles.title_wrapper}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue