function BottomSheet({ onClose, children }) {
  const mountedAt = useRef(Date.now());

  const handleClose = useCallback(() => {
    if (Date.now() - mountedAt.current < 400) return;
    onClose();
  }, [onClose]);

  return (
    <React.Fragment>
      <div style={appStyles.sheetBackdrop} onClick={handleClose}></div>
      <div style={appStyles.sheet}>
        <div style={appStyles.sheetGrip}></div>
        {children}
      </div>
    </React.Fragment>
  );
}
