auto-component 0.0.27 → 0.0.29
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 +1 -1
- package/src/auto-component.css +2 -0
- package/src/index.jsx +3 -4
package/package.json
CHANGED
package/src/auto-component.css
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
flex-direction: column;
|
|
6
6
|
align-items: center;
|
|
7
7
|
margin: 40px 0;
|
|
8
|
+
font-family: Arial, Helvetica, sans-serif
|
|
8
9
|
}
|
|
9
10
|
#content-creator div {
|
|
10
11
|
width: 100%;
|
|
@@ -50,6 +51,7 @@
|
|
|
50
51
|
}
|
|
51
52
|
.tab {
|
|
52
53
|
margin: 0 10%;
|
|
54
|
+
padding: 4px 0;
|
|
53
55
|
background: #444;
|
|
54
56
|
color: #aaa;
|
|
55
57
|
border-radius: 5px 5px 0 0;
|
package/src/index.jsx
CHANGED
|
@@ -109,7 +109,7 @@ const AutoComponent = ({ exclusions }) => {
|
|
|
109
109
|
});
|
|
110
110
|
|
|
111
111
|
if (res.ok) {
|
|
112
|
-
const jsonData = await res.json();
|
|
112
|
+
const jsonData = await res.json();
|
|
113
113
|
return jsonData;
|
|
114
114
|
} else {
|
|
115
115
|
throw new Error("Invalid request!");
|
|
@@ -172,8 +172,7 @@ const AutoComponent = ({ exclusions }) => {
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
const copyToClipboard = async () => {
|
|
175
|
-
const text = activeTab === 'response' ? responseData :
|
|
176
|
-
|
|
175
|
+
const text = activeTab === 'response' ? responseData : requestData
|
|
177
176
|
await navigator.clipboard.writeText(text)
|
|
178
177
|
}
|
|
179
178
|
|
|
@@ -219,7 +218,7 @@ User Request:\n `
|
|
|
219
218
|
{activeTab === 'request' ? requestHTML : responseHtml}
|
|
220
219
|
</pre>
|
|
221
220
|
</div>
|
|
222
|
-
<div className="copy-btn" onClick={copyToClipboard}>
|
|
221
|
+
<div className="copy-btn" onClick={copyToClipboard} style={activeTab !== 'response' ? { display: 'none' } : null}>
|
|
223
222
|
copy
|
|
224
223
|
</div>
|
|
225
224
|
</div>
|