Skip to content

Commit 52ba730

Browse files
committed
Changes
1 parent 23072c7 commit 52ba730

File tree

5 files changed

+37
-33
lines changed

5 files changed

+37
-33
lines changed

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "forgeforms",
33
"private": false,
4-
"version": "1.2.0",
4+
"version": "1.5.0",
55
"type": "module",
66
"main": "dist/forgeforms.js",
77
"module": "dist/forgeforms.js",

src/App.jsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ function App() {
55
return (
66
<div>
77
<h1>My App</h1>
8-
<ForgeForms apiKey="9f7fadce-7132-4faa-b960-3de1287b09d8" />
8+
<ForgeForms
9+
showTitle={`false`}
10+
apiKey="e2990749-624b-4f9e-a9cf-60cecf6132ca"
11+
/>
912
</div>
1013
);
1114
}

src/ForgeForms.jsx

+12-12
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Skeleton from "react-loading-skeleton";
99
import "react-loading-skeleton/dist/skeleton.css";
1010
import HCaptcha from "@hcaptcha/react-hcaptcha";
1111

12-
const ForgeForms = ({ apiKey }) => {
12+
const ForgeForms = ({ apiKey, showTitle }) => {
1313
const [formFields, setFormFields] = useState([]);
1414
const [originalResponse, setOriginalResponse] = useState([]);
1515
const [formTitle, setFormTitle] = useState("");
@@ -138,11 +138,11 @@ const ForgeForms = ({ apiKey }) => {
138138
return (
139139
<div className="custom-class">
140140
{error && (
141-
<div className="rounded-md bg-red-50 p-4">
142-
<div className="flex">
143-
<div className="flex-shrink-0">
141+
<div className="rpk-rounded-md rpk-bg-red-50 rpk-p-4">
142+
<div className="rpk-flex">
143+
<div className="rpk-flex-shrink-0">
144144
<svg
145-
className="h-5 w-5 textRed-400"
145+
className="rpk-h-5 rpk-w-5 rpk-text-red-400"
146146
viewBox="0 0 20 20"
147147
fill="red"
148148
aria-hidden="true"
@@ -154,12 +154,15 @@ const ForgeForms = ({ apiKey }) => {
154154
/>
155155
</svg>
156156
</div>
157-
<div className="ml-3">
158-
<h3 className="text-sm font-medium text-red-800">
157+
<div className="rpk-ml-3">
158+
<h3 className="rpk-text-sm rpk-font-medium rpk-text-red-800">
159159
There were errors with your submission
160160
</h3>
161-
<div className="mt-2 text-sm text-red-700">
162-
<ul role="list" className="list-disc space-y-1 pl-5">
161+
<div className="rpk-mt-2 rpk-text-sm rpk-text-red-700">
162+
<ul
163+
role="list"
164+
className="rpk-list-disc rpk-space-y-1 rpk-pl-5"
165+
>
163166
{errorMsg.map((error, index) => (
164167
<li key={index}>{error}</li>
165168
))}
@@ -170,9 +173,6 @@ const ForgeForms = ({ apiKey }) => {
170173
</div>
171174
)}
172175

173-
<h2 className="form-title">
174-
{dataLoaded ? formTitle : <Skeleton width={200} />}
175-
</h2>
176176
<form onSubmit={handleSubmit}>
177177
{formFields
178178
.filter((field) => field.id !== "terms&conditions")

src/index.css

+18-17
Original file line numberDiff line numberDiff line change
@@ -229,55 +229,56 @@ input[type="checkbox"]:checked {
229229
body {
230230
font-family: "Inter", sans-serif;
231231
}
232-
.rounded-md {
232+
233+
.rpk-rounded-md {
233234
border-radius: 0.375rem;
234235
}
235-
.bg-red-50 {
236+
.rpk-bg-red-50 {
236237
background-color: #fef2f2;
237238
}
238-
.p-4 {
239+
.rpk-p-4 {
239240
padding: 1rem;
240241
}
241-
.flex {
242+
.rpk-flex {
242243
display: flex;
243244
align-items: center; /* Added to center items */
244245
}
245-
.flex-shrink-0 {
246+
.rpk-flex-shrink-0 {
246247
flex-shrink: 0;
247248
}
248-
.h-5 {
249+
.rpk-h-5 {
249250
height: 1.25rem;
250251
}
251-
.w-5 {
252+
.rpk-w-5 {
252253
width: 1.25rem;
253254
}
254-
.text-red-400 {
255+
.rpk-text-red-400 {
255256
fill: red; /* Changed color to red */
256257
}
257-
.ml-3 {
258+
.rpk-ml-3 {
258259
margin-left: 0.75rem;
259260
}
260-
.text-sm {
261+
.rpk-text-sm {
261262
font-size: 0.875rem;
262263
}
263-
.font-medium {
264+
.rpk-font-medium {
264265
font-weight: 500;
265266
}
266-
.text-red-800 {
267+
.rpk-text-red-800 {
267268
color: #b91c1c;
268269
}
269-
.mt-2 {
270+
.rpk-mt-2 {
270271
margin-top: 0.5rem;
271272
}
272-
.text-red-700 {
273+
.rpk-text-red-700 {
273274
color: #ef4444;
274275
}
275-
.list-disc {
276+
.rpk-list-disc {
276277
list-style-type: disc;
277278
}
278-
.space-y-1 {
279+
.rpk-space-y-1 {
279280
margin-top: 0.25rem;
280281
}
281-
.pl-5 {
282+
.rpk-pl-5 {
282283
padding-left: 1.25rem;
283284
}

0 commit comments

Comments
 (0)