auto-component 0.0.28 → 0.0.30
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 +5 -3
- package/src/index.jsx +3 -3
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;
|
|
@@ -82,14 +84,14 @@
|
|
|
82
84
|
}
|
|
83
85
|
.copy-btn {
|
|
84
86
|
position: absolute;
|
|
85
|
-
top:
|
|
87
|
+
top: 130px;
|
|
86
88
|
right: 7%;
|
|
87
|
-
max-width:
|
|
89
|
+
max-width: 50px;
|
|
88
90
|
max-height: 30px;
|
|
89
91
|
cursor: pointer;
|
|
90
92
|
background: rgba(0, 0, 0, 0.2);
|
|
91
93
|
border-radius: 5px;
|
|
92
|
-
padding: 10px;
|
|
94
|
+
padding: 10px 20px;
|
|
93
95
|
color: #fff;
|
|
94
96
|
}
|
|
95
97
|
|
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,7 +172,7 @@ const AutoComponent = ({ exclusions }) => {
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
const copyToClipboard = async () => {
|
|
175
|
-
const text = activeTab === 'response' ? responseData :
|
|
175
|
+
const text = activeTab === 'response' ? responseData : requestData
|
|
176
176
|
await navigator.clipboard.writeText(text)
|
|
177
177
|
}
|
|
178
178
|
|
|
@@ -218,7 +218,7 @@ User Request:\n `
|
|
|
218
218
|
{activeTab === 'request' ? requestHTML : responseHtml}
|
|
219
219
|
</pre>
|
|
220
220
|
</div>
|
|
221
|
-
<div className="copy-btn" onClick={copyToClipboard}>
|
|
221
|
+
<div className="copy-btn" onClick={copyToClipboard} style={activeTab !== 'response' ? { display: 'none' } : null}>
|
|
222
222
|
copy
|
|
223
223
|
</div>
|
|
224
224
|
</div>
|