@@ -74,6 +74,7 @@ const gradientTypes = [
7474 { label : "Mini" , value : "mini" } ,
7575 { label : "Pink" , value : "pink" } ,
7676 { label : "Conic" , value : "conic" } ,
77+ { label : "Custom Image" , value : "custom" } ,
7778] ;
7879
7980export default function GradientEditor ( ) {
@@ -92,6 +93,7 @@ export default function GradientEditor() {
9293 borderRadius : 0 ,
9394 hasCardBorder : false ,
9495 isRtl : false ,
96+ customImage : "/logo.svg" ,
9597
9698 title : "Postmaker.dev" ,
9799 text : `Create Posts` ,
@@ -122,6 +124,7 @@ export default function GradientEditor() {
122124 gradientHeight,
123125 gradientType,
124126 blurAmount,
127+ customImage,
125128 } = state ;
126129
127130 // Load from localStorage on mount
@@ -197,7 +200,18 @@ export default function GradientEditor() {
197200 </ option >
198201 ) ) }
199202 </ select >
200-
203+ { gradientType === "custom" && (
204+ < >
205+ < p > Custom Image URL:</ p >
206+ < input
207+ className = "w-full px-2 border rounded-md"
208+ value = { customImage }
209+ name = "customImage"
210+ onChange = { ( e ) => setStateValue ( e . target . name , e . target . value ) }
211+ placeholder = "Enter custom image URL..."
212+ />
213+ </ >
214+ ) }
201215 { /* Blur Amount */ }
202216 < p > Blur Amount: { blurAmount } px</ p >
203217 < input
@@ -212,6 +226,7 @@ export default function GradientEditor() {
212226 className = "w-full"
213227 />
214228
229+
215230 < p > Title:</ p >
216231 < input
217232 className = "w-full px-2 border rounded-md"
@@ -220,6 +235,7 @@ export default function GradientEditor() {
220235 onChange = { ( e ) => setStateValue ( e . target . name , e . target . value ) }
221236 placeholder = "Enter title..."
222237 />
238+
223239 < p > Subtitle:</ p >
224240 < input
225241 className = "w-full px-2 border rounded-md"
@@ -437,6 +453,7 @@ export default function GradientEditor() {
437453 blurAmount = { blurAmount }
438454 scale = { scale }
439455 gradientType = { gradientType }
456+ customImage = { customImage }
440457 styles = { {
441458 zIndex : 10 ,
442459 // scale: exportScale,
0 commit comments