next-helios-fe 1.8.112 → 1.8.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -106,17 +106,19 @@ export const Color: React.FC<ColorProps> = ({
|
|
106
106
|
value={tempValue}
|
107
107
|
onChange={(e) => setTempValue(e.target.value.toUpperCase())}
|
108
108
|
/>
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
e
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
109
|
+
{onClipboardClick && (
|
110
|
+
<button
|
111
|
+
type="button"
|
112
|
+
className="absolute right-4 p-1 rounded-full text-xl text-disabled cursor-pointer hover:bg-secondary-light"
|
113
|
+
tabIndex={-1}
|
114
|
+
onClick={(e) => {
|
115
|
+
e.preventDefault();
|
116
|
+
onClipboardClick && onClipboardClick(tempValue);
|
117
|
+
}}
|
118
|
+
>
|
119
|
+
<Icon icon="fluent:clipboard-text-ltr-32-regular" />
|
120
|
+
</button>
|
121
|
+
)}
|
120
122
|
</div>
|
121
123
|
</div>
|
122
124
|
</label>
|
@@ -76,17 +76,19 @@ export const Secret: React.FC<SecretProps> = ({
|
|
76
76
|
>
|
77
77
|
<Icon icon={`flowbite:eye${show ? "" : "-slash"}-outline`} />
|
78
78
|
</button>
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
e
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
79
|
+
{onClipboardClick && (
|
80
|
+
<button
|
81
|
+
type="button"
|
82
|
+
className="p-1 rounded-full text-xl text-disabled cursor-pointer hover:bg-secondary-light"
|
83
|
+
tabIndex={-1}
|
84
|
+
onClick={(e) => {
|
85
|
+
e.preventDefault();
|
86
|
+
onClipboardClick && onClipboardClick(value!);
|
87
|
+
}}
|
88
|
+
>
|
89
|
+
<Icon icon="fluent:clipboard-text-ltr-32-regular" />
|
90
|
+
</button>
|
91
|
+
)}
|
90
92
|
</div>
|
91
93
|
</div>
|
92
94
|
</label>
|
@@ -11,9 +11,6 @@ interface SyntaxHighlighterProps {
|
|
11
11
|
theme?: "light" | "dark";
|
12
12
|
codeString: string;
|
13
13
|
language?: string;
|
14
|
-
options?: {
|
15
|
-
scrollable?: boolean;
|
16
|
-
};
|
17
14
|
onClipboardClick?: (value: string) => void;
|
18
15
|
}
|
19
16
|
|
@@ -21,16 +18,12 @@ export const SyntaxHighlighter: React.FC<SyntaxHighlighterProps> = ({
|
|
21
18
|
theme,
|
22
19
|
codeString,
|
23
20
|
language,
|
24
|
-
options,
|
25
21
|
onClipboardClick,
|
26
22
|
}) => {
|
27
23
|
return (
|
28
|
-
<div
|
29
|
-
className={`relative w-full border rounded-md text-sm ${
|
30
|
-
options?.scrollable ? "overflow-auto" : "overflow-hidden"
|
31
|
-
}`}
|
32
|
-
>
|
24
|
+
<div className="relative flex w-full border rounded-md text-sm overflow-hidden">
|
33
25
|
<SH
|
26
|
+
customStyle={{ flex: "1", overflow: "auto" }}
|
34
27
|
language={language}
|
35
28
|
style={theme === "light" ? atomOneLight : atomOneDark}
|
36
29
|
showLineNumbers
|
@@ -38,16 +31,18 @@ export const SyntaxHighlighter: React.FC<SyntaxHighlighterProps> = ({
|
|
38
31
|
>
|
39
32
|
{codeString}
|
40
33
|
</SH>
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
e
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
34
|
+
{onClipboardClick && (
|
35
|
+
<div
|
36
|
+
className="absolute top-4 right-4 p-1 rounded-full text-xl text-disabled cursor-pointer hover:bg-secondary-light"
|
37
|
+
onClick={(e) => {
|
38
|
+
e.preventDefault();
|
39
|
+
navigator.clipboard.writeText(codeString);
|
40
|
+
onClipboardClick && onClipboardClick(codeString);
|
41
|
+
}}
|
42
|
+
>
|
43
|
+
<Icon icon="fluent:clipboard-text-ltr-32-regular" />
|
44
|
+
</div>
|
45
|
+
)}
|
51
46
|
</div>
|
52
47
|
);
|
53
48
|
};
|