Skip to content

🎥 Make videos programmatically with React

check insted of "copied"

Patric Salvisberg7707d22e90c9
diff --git a/packages/cli/src/editor/components/RenderModal/CliCopyButton.tsx b/packages/cli/src/editor/components/RenderModal/CliCopyButton.tsx
index 0a9f48063c..471b850b16 100644
--- a/packages/cli/src/editor/components/RenderModal/CliCopyButton.tsx
+++ b/packages/cli/src/editor/components/RenderModal/CliCopyButton.tsx
@@ -1,6 +1,6 @@
import {useCallback, useEffect, useMemo, useState} from 'react';
import {LIGHT_TEXT} from '../../helpers/colors';
-const iconStyle: React.CSSProperties = {
+const svgStyle: React.CSSProperties = {
width: 16,
height: 16,
verticalAlign: 'sub',
@@ -9,8 +9,10 @@ const iconStyle: React.CSSProperties = {
const copiedStyle: React.CSSProperties = {
fontSize: '14px',
minHeight: '30px',
+ minWidth: '30px',
display: 'flex',
alignItems: 'center',
+ justifyContent: 'center',
};
export const CliCopyButton: React.FC<{valueToCopy: string}> = ({
@@ -33,7 +35,7 @@ export const CliCopyButton: React.FC<{valueToCopy: string}> = ({
role="img"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 384 512"
- style={iconStyle}
+ style={svgStyle}
>
<path
fill={fillColor}
@@ -42,6 +44,19 @@ export const CliCopyButton: React.FC<{valueToCopy: string}> = ({
</svg>
);
+ const checkSvg = (
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 448 512"
+ style={svgStyle}
+ >
+ <path
+ fill={fillColor}
+ d="M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"
+ />
+ </svg>
+ );
+
const onPointerEnter = useCallback(() => {
setHovered(true);
}, []);
@@ -84,6 +99,6 @@ export const CliCopyButton: React.FC<{valueToCopy: string}> = ({
{clipboardIcon}
</button>
) : (
- <span style={copiedStyle}>copied</span>
+ <span style={copiedStyle}>{checkSvg}</span>
);
};