@@ -305,9 +305,10 @@ const CustomizationPanel = ({ isThemeLight }): JSX.Element => {
305
305
payload : { event : selectedEvent }
306
306
} ) ;
307
307
} ;
308
- const handleTailwind = ( ) : Object => {
308
+
309
+
310
+ const handleSave = ( ) : Object => {
309
311
console . log ( 'stateusedobj' , stateUsedObj )
310
- dispatch ( { type : 'CHANGE TAILWIND' , payload : true } ) ;
311
312
dispatch ( {
312
313
type : 'UPDATE STATE USED' ,
313
314
payload : { stateUsedObj : stateUsedObj }
@@ -347,55 +348,60 @@ const CustomizationPanel = ({ isThemeLight }): JSX.Element => {
347
348
type : 'UPDATE EVENTS' ,
348
349
payload : { events : eventsObj }
349
350
} ) ;
350
-
351
351
return styleObj ;
352
+ } ;
353
+ const handleTailwind = ( ) : Object => {
354
+ console . log ( 'stateusedobj' , stateUsedObj )
355
+ dispatch ( { type : 'CHANGE TAILWIND' , payload : true } ) ;
352
356
353
357
354
- }
358
+ handleSave ( )
359
+
360
+ // dispatch({
361
+ // type: 'UPDATE STATE USED',
362
+ // payload: {stateUsedObj: stateUsedObj}
363
+ // })
355
364
356
- const handleSave = ( ) : Object => {
357
- console . log ( 'stateusedobj' , stateUsedObj )
358
- dispatch ( {
359
- type : 'UPDATE STATE USED' ,
360
- payload : { stateUsedObj : stateUsedObj }
361
- } )
362
365
366
+ // dispatch({
367
+ // type: 'UPDATE USE CONTEXT',
368
+ // payload: { useContextObj: useContextObj}
369
+ // })
363
370
364
- dispatch ( {
365
- type : 'UPDATE USE CONTEXT' ,
366
- payload : { useContextObj : useContextObj }
367
- } )
371
+ // const styleObj: any = {};
372
+ // if (displayMode !== '') styleObj.display = displayMode;
373
+ // if (flexDir !== '') styleObj.flexDirection = flexDir;
374
+ // if (flexJustify !== '') styleObj.justifyContent = flexJustify;
375
+ // if (flexAlign !== '') styleObj.alignItems = flexAlign;
376
+ // if (compWidth !== '') styleObj.width = compWidth;
377
+ // if (compHeight !== '') styleObj.height = compHeight;
378
+ // if (BGColor !== '') styleObj.backgroundColor = BGColor;
379
+ // dispatch({
380
+ // type: 'UPDATE CSS',
381
+ // payload: { style: styleObj }
382
+ // });
368
383
369
- const styleObj : any = { } ;
370
- if ( displayMode !== '' ) styleObj . display = displayMode ;
371
- if ( flexDir !== '' ) styleObj . flexDirection = flexDir ;
372
- if ( flexJustify !== '' ) styleObj . justifyContent = flexJustify ;
373
- if ( flexAlign !== '' ) styleObj . alignItems = flexAlign ;
374
- if ( compWidth !== '' ) styleObj . width = compWidth ;
375
- if ( compHeight !== '' ) styleObj . height = compHeight ;
376
- if ( BGColor !== '' ) styleObj . backgroundColor = BGColor ;
377
- dispatch ( {
378
- type : 'UPDATE CSS' ,
379
- payload : { style : styleObj }
380
- } ) ;
384
+ // const attributesObj: any = {};
385
+ // if (compText !== '') attributesObj.compText = compText;
386
+ // if (compLink !== '') attributesObj.compLink = compLink;
387
+ // if (cssClasses !== '') attributesObj.cssClasses = cssClasses;
388
+ // dispatch({
389
+ // type: 'UPDATE ATTRIBUTES',
390
+ // payload: { attributes: attributesObj }
391
+ // });
381
392
382
- const attributesObj : any = { } ;
383
- if ( compText !== '' ) attributesObj . compText = compText ;
384
- if ( compLink !== '' ) attributesObj . compLink = compLink ;
385
- if ( cssClasses !== '' ) attributesObj . cssClasses = cssClasses ;
386
- dispatch ( {
387
- type : 'UPDATE ATTRIBUTES' ,
388
- payload : { attributes : attributesObj }
389
- } ) ;
393
+ // const eventsObj: any = {};
394
+ // if (eventAll[0] !== '') eventsObj[eventAll[0]] = eventAll[1];
395
+ // dispatch({
396
+ // type: 'UPDATE EVENTS',
397
+ // payload: { events: eventsObj }
398
+ // });
399
+
400
+ // return styleObj;
401
+
402
+
403
+ }
390
404
391
- const eventsObj : any = { } ;
392
- if ( eventAll [ 0 ] !== '' ) eventsObj [ eventAll [ 0 ] ] = eventAll [ 1 ] ;
393
- dispatch ( {
394
- type : 'UPDATE EVENTS' ,
395
- payload : { events : eventsObj }
396
- } ) ;
397
- return styleObj ;
398
- } ;
399
405
// UNDO/REDO functionality--onClick these functions will be invoked.
400
406
const handleUndo = ( ) => {
401
407
dispatch ( { type : 'UNDO' , payload : { } } ) ;
0 commit comments