mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
fixed mobile appearance of dialogs
This commit is contained in:
parent
4483d7a0f5
commit
042f238590
8 changed files with 25 additions and 19 deletions
|
@ -39,7 +39,7 @@ const FlowCell: FC<Props> = ({
|
|||
canEdit = false,
|
||||
onChangeCellView,
|
||||
}) => {
|
||||
const { innerWidth } = useWindowSize();
|
||||
const { isMobile } = useWindowSize();
|
||||
|
||||
const withText =
|
||||
((!!flow.display && flow.display !== 'single') || !image) && flow.show_description && !!text;
|
||||
|
@ -54,11 +54,11 @@ const FlowCell: FC<Props> = ({
|
|||
const { isActive: isMenuActive, activate, ref, deactivate } = useClickOutsideFocus();
|
||||
|
||||
const shadeSize = useMemo(() => {
|
||||
const min = innerWidth < 768 ? 10 : 15;
|
||||
const max = innerWidth < 768 ? 20 : 50;
|
||||
const min = isMobile ? 10 : 15;
|
||||
const max = isMobile ? 20 : 50;
|
||||
|
||||
return withText ? min : max;
|
||||
}, [withText, innerWidth]);
|
||||
}, [withText, isMobile]);
|
||||
|
||||
return (
|
||||
<div className={classNames(styles.cell, styles[flow.display || 'single'])} ref={ref as any}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue