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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-helios-fe",
3
- "version": "1.8.112",
3
+ "version": "1.8.113",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -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
- <button
110
- type="button"
111
- className="absolute right-4 p-1 rounded-full text-xl text-disabled cursor-pointer hover:bg-secondary-light"
112
- tabIndex={-1}
113
- onClick={(e) => {
114
- e.preventDefault();
115
- onClipboardClick && onClipboardClick(tempValue);
116
- }}
117
- >
118
- <Icon icon="fluent:clipboard-text-ltr-32-regular" />
119
- </button>
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
- <button
80
- type="button"
81
- className="p-1 rounded-full text-xl text-disabled cursor-pointer hover:bg-secondary-light"
82
- tabIndex={-1}
83
- onClick={(e) => {
84
- e.preventDefault();
85
- onClipboardClick && onClipboardClick(value!);
86
- }}
87
- >
88
- <Icon icon="fluent:clipboard-text-ltr-32-regular" />
89
- </button>
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
- <div
42
- className="absolute top-4 right-4 p-1 rounded-full text-xl text-disabled cursor-pointer hover:bg-secondary-light"
43
- onClick={(e) => {
44
- e.preventDefault();
45
- navigator.clipboard.writeText(codeString);
46
- onClipboardClick && onClipboardClick(codeString);
47
- }}
48
- >
49
- <Icon icon="fluent:clipboard-text-ltr-32-regular" />
50
- </div>
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
  };