import React, { useContext, useRef, useCallback } from 'react'; import { ThemeContext } from '../theme'; import styles from '../style.css'; import { BarProps } from '../typings'; const Bar = ({ onDoubleClick, children, bottomBar }: BarProps) => { const { platform, bar: { height, borderBottom, background, fontFamily, color, }, menu: { style, } } = useContext(ThemeContext); const ref = useRef(null); const dblClick = useCallback((e) => { if (e.target == ref.current) { onDoubleClick && onDoubleClick(e); } }, [ref.current, onDoubleClick]) const isDarwin = platform === 'darwin'; return (
{children}
); }; export default Bar;