diff --git a/modelina-website/src/components/CodeBlock.tsx b/modelina-website/src/components/CodeBlock.tsx index 80c1cf0631..24cac5d506 100644 --- a/modelina-website/src/components/CodeBlock.tsx +++ b/modelina-website/src/components/CodeBlock.tsx @@ -5,6 +5,7 @@ import Highlight from 'react-syntax-highlighter'; import Caption from './Caption'; import IconClipboard from './icons/Clipboard'; +import IconCheck from './icons/IconCheck'; const theme = { hljs: { @@ -270,10 +271,13 @@ export default function CodeBlock({ className='absolute right-2 top-1 z-50 cursor-pointer bg-code-editor-dark text-xs text-gray-500 hover:text-gray-300 focus:outline-none' title='Copy to clipboard' > - {showIsCopied && Copied!} - - - + + {showIsCopied ? ( + + ) : ( + + )} + )} diff --git a/modelina-website/src/components/icons/Clipboard.tsx b/modelina-website/src/components/icons/Clipboard.tsx index c01991b3ba..548063212b 100644 --- a/modelina-website/src/components/icons/Clipboard.tsx +++ b/modelina-website/src/components/icons/Clipboard.tsx @@ -1,6 +1,6 @@ export default function IconClipboard({ className }: any) { return ( - + ); diff --git a/modelina-website/src/components/icons/IconCheck.tsx b/modelina-website/src/components/icons/IconCheck.tsx new file mode 100644 index 0000000000..46426c86e2 --- /dev/null +++ b/modelina-website/src/components/icons/IconCheck.tsx @@ -0,0 +1,21 @@ +export default function IconCheck({ className }: any) { + return ( + + + + + ); + } + \ No newline at end of file