2023-09-11 15:26:44 +00:00
|
|
|
import { forwardRef, PropsWithChildren } from 'react';
|
2023-02-28 05:29:48 +00:00
|
|
|
import { cx } from '@sd/ui';
|
2023-09-29 05:57:39 +00:00
|
|
|
import { useOperatingSystem } from '~/hooks';
|
2023-02-28 05:29:48 +00:00
|
|
|
|
|
|
|
export default forwardRef<HTMLDivElement, PropsWithChildren & { className?: string }>(
|
2023-09-29 05:57:39 +00:00
|
|
|
(props, ref) => {
|
|
|
|
const os = useOperatingSystem();
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div
|
|
|
|
data-tauri-drag-region={os === 'macOS'}
|
|
|
|
className={cx('flex h-5 w-full flex-shrink-0', props.className)}
|
|
|
|
ref={ref}
|
|
|
|
>
|
|
|
|
{props.children}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
2023-02-28 05:29:48 +00:00
|
|
|
);
|