import React from 'react' import { useCopyTextHandler } from 'actionsack' import { COLORS } from '../lib/constants' import { Controls, ControlsBW } 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 ( ) }) export default ({ theme, copyable, code, light }) => (
{theme === 'bw' ? : }
{copyable && (
)}
)