mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-05 06:50:28 +03:00
still trying to find a place for this to live
This commit is contained in:
parent
2cdc4a4969
commit
4085732d39
1 changed files with 32 additions and 0 deletions
32
src/app/features/room/message/MobileContextMenu.tsx
Normal file
32
src/app/features/room/message/MobileContextMenu.tsx
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
import classNames from 'classnames';
|
||||||
|
import React from 'react';
|
||||||
|
import * as css from './styles.css';
|
||||||
|
|
||||||
|
export function BottomSheetMenu({
|
||||||
|
isOpen,
|
||||||
|
onClose,
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
isOpen: boolean;
|
||||||
|
onClose: () => void;
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
style={{ position: 'fixed', inset: 0, zIndex: 1000, pointerEvents: isOpen ? 'auto' : 'none' }}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className={classNames(css.menuBackdrop, { [css.menuBackdropOpen]: isOpen })}
|
||||||
|
onClick={onClose}
|
||||||
|
aria-hidden="true"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
className={classNames(css.menuSheet, { [css.menuSheetOpen]: isOpen })}
|
||||||
|
role="dialog"
|
||||||
|
aria-modal="true"
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue