import React from 'react' import { useCopyTextHandler } from 'actionsack' import { COLORS } from '../lib/constants' import { Controls, ControlsBW, ControlsBoxy } from './svg/Controls' import CopySVG from './svg/Copy' import CheckMark from './svg/Checkmark' const size = 24 const CopyButton = React.memo(function CopyButton({ text }) { const { onClick, copied } = useCopyTextHandler(text) return ( ) }) const WINDOW_THEMES_MAP = { bw: , boxy: } export function TitleBar({ light, value, onChange }) { return (
onChange(e.target.value)} />
) } export default function WindowControls({ theme, copyable, code, light, titleBar, onTitleBarChange, }) { return (
{WINDOW_THEMES_MAP[theme] || } {copyable && (
)}
) }