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 default ({ theme, copyable, code, light }) => (
{WINDOW_THEMES_MAP[theme] || }
{copyable && (
)}
)