| 1 |
import { __ } from '@wordpress/i18n'; |
| 2 |
import { Icon, textColor } from '@wordpress/icons'; |
| 3 |
|
| 4 |
export const TextSimple = ({ |
| 5 |
text, |
| 6 |
color, |
| 7 |
}: { |
| 8 |
text?: string; |
| 9 |
color?: string; |
| 10 |
}) => { |
| 11 |
if (text === undefined) { |
| 12 |
return ( |
| 13 |
<Icon |
| 14 |
icon={textColor} |
| 15 |
fill={color} |
| 16 |
className="border border-solid border-gray-900" |
| 17 |
/> |
| 18 |
); |
| 19 |
} |
| 20 |
return ( |
| 21 |
<span className="cbp-btn-text">{text || __('Copy', 'code-block-pro')}</span> |
| 22 |
); |
| 23 |
}; |
| 24 |
|