@@ -136,7 +136,7 @@ export const ColorSchemeDialog: React.FC<ColorSchemeDialogProps> = ({ setDesignS
136136 case 'none' :
137137 return 'none' ;
138138 case 'sm' :
139- return '0 1px 2px 0 rgb(0 0 0 / 0.05 )' ;
139+ return '0 1px 2px 0 rgb(0 0 0 / 0.1 )' ;
140140 case 'md' :
141141 return '0 4px 6px -1px rgb(0 0 0 / 0.1)' ;
142142 case 'lg' :
@@ -436,14 +436,48 @@ export const ColorSchemeDialog: React.FC<ColorSchemeDialogProps> = ({ setDesignS
436436 </ div >
437437 ) ;
438438
439+ const getBorderRadiusPixels = ( key : string ) : string => {
440+ switch ( key ) {
441+ case 'none' :
442+ return '0px' ;
443+ case 'sm' :
444+ return '0.25rem' ;
445+ case 'md' :
446+ return '0.375rem' ;
447+ case 'lg' :
448+ return '0.5rem' ;
449+ case 'xl' :
450+ return '0.75rem' ;
451+ case 'full' :
452+ return '9999px' ;
453+ default :
454+ return '0.375rem' ;
455+ }
456+ } ;
457+
458+ const getSpacingPixels = ( key : string ) : string => {
459+ switch ( key ) {
460+ case 'tight' :
461+ return '0.5rem' ;
462+ case 'normal' :
463+ return '1rem' ;
464+ case 'relaxed' :
465+ return '1.25rem' ;
466+ case 'loose' :
467+ return '1.5rem' ;
468+ default :
469+ return '1rem' ;
470+ }
471+ } ;
472+
439473 const renderStylingSection = ( ) => (
440- < div className = "space-y-6" >
441- < h3 className = "text-lg font-semibold text-codinit-elements-textPrimary flex items-center gap-2" >
442- < div className = "w-2 h-2 rounded-full bg-codinit-elements-item-contentAccent" > </ div >
443- Design Styling
444- </ h3 >
474+ < div className = "space-y-6 max-h-80 overflow-y-auto pr-4 custom-scrollbar" >
475+ < div className = "space-y-6 pr-2" >
476+ < h3 className = "text-lg font-semibold text-codinit-elements-textPrimary flex items-center gap-2" >
477+ < div className = "w-2 h-2 rounded-full bg-codinit-elements-item-contentAccent" > </ div >
478+ Design Styling
479+ </ h3 >
445480
446- < div className = "grid grid-cols-3 gap-6" >
447481 { /* Border Radius */ }
448482 < div className = "space-y-3" >
449483 < label className = "text-sm font-medium text-codinit-elements-textPrimary" > Border Radius</ label >
@@ -461,7 +495,8 @@ export const ColorSchemeDialog: React.FC<ColorSchemeDialogProps> = ({ setDesignS
461495 >
462496 < div className = "text-center space-y-1" >
463497 < div
464- className = { `w-6 h-6 mx-auto rounded-${ option . key === 'none' ? 'none' : option . key === 'sm' ? 'sm' : option . key === 'md' ? 'md' : option . key === 'lg' ? 'lg' : option . key === 'xl' ? 'xl' : 'full' } bg-current opacity-80` }
498+ className = "w-6 h-6 mx-auto bg-current opacity-80"
499+ style = { { borderRadius : getBorderRadiusPixels ( option . key ) } }
465500 />
466501 < div className = "text-xs font-medium" > { option . label } </ div >
467502 </ div >
@@ -483,7 +518,10 @@ export const ColorSchemeDialog: React.FC<ColorSchemeDialogProps> = ({ setDesignS
483518 shadow === option . key
484519 ? 'bg-codinit-elements-item-backgroundAccent border-codinit-elements-borderColorActive text-white'
485520 : 'bg-codinit-elements-background-depth-3 dark:bg-codinit-elements-background-depth-3-dark border-codinit-elements-borderColor dark:border-codinit-elements-borderColor-dark hover:border-codinit-elements-borderColorActive text-codinit-elements-textSecondary dark:text-codinit-elements-textSecondary-dark hover:text-codinit-elements-textPrimary dark:hover:text-codinit-elements-textPrimary-dark'
486- } ${ option . key === 'none' ? '' : option . key === 'sm' ? 'shadow-sm' : option . key === 'md' ? 'shadow-md' : option . key === 'lg' ? 'shadow-lg' : 'shadow-xl' } `}
521+ } `}
522+ style = { {
523+ boxShadow : shadow === option . key ? getBoxShadow ( ) : 'none' ,
524+ } }
487525 >
488526 < div className = "text-center space-y-1" >
489527 < div className = "w-6 h-6 mx-auto bg-current rounded opacity-80" />
@@ -510,10 +548,13 @@ export const ColorSchemeDialog: React.FC<ColorSchemeDialogProps> = ({ setDesignS
510548 } `}
511549 >
512550 < div className = "text-center space-y-1" >
513- < div className = "flex justify-center space-x-1" >
514- < div className = "w-2 h-6 bg-current rounded opacity-80" />
515- < div className = "w-2 h-6 bg-current rounded opacity-80" />
516- < div className = "w-2 h-6 bg-current rounded opacity-80" />
551+ < div
552+ className = "flex justify-center items-center opacity-80"
553+ style = { { gap : getSpacingPixels ( option . key ) } }
554+ >
555+ < div className = "w-2 h-6 bg-current rounded" />
556+ < div className = "w-2 h-6 bg-current rounded" />
557+ < div className = "w-2 h-6 bg-current rounded" />
517558 </ div >
518559 < div className = "text-xs font-medium" > { option . label } </ div >
519560 </ div >
@@ -654,27 +695,16 @@ export const ColorSchemeDialog: React.FC<ColorSchemeDialogProps> = ({ setDesignS
654695 { /* Preview Container */ }
655696 < div className = "flex-1 rounded-xl border border-codinit-elements-borderColor overflow-hidden bg-codinit-elements-background-depth-3" >
656697 < div
657- className = "h-full w-full p-6 overflow-y-auto custom-scrollbar"
698+ className = "h-full w-full overflow-y-auto custom-scrollbar"
658699 style = { {
659700 backgroundColor : palette [ mode ] . background ,
660701 color : palette [ mode ] . text ,
661702 fontFamily : font . join ( ', ' ) ,
662- borderRadius :
663- borderRadius === 'none'
664- ? '0px'
665- : borderRadius === 'sm'
666- ? '0.25rem'
667- : borderRadius === 'md'
668- ? '0.375rem'
669- : borderRadius === 'lg'
670- ? '0.5rem'
671- : borderRadius === 'xl'
672- ? '0.75rem'
673- : '1rem' ,
703+ padding : getSpacingPixels ( spacing ) ,
674704 } }
675705 >
676706 { /* Preview Content */ }
677- < div className = "space-y-12 mt-4" >
707+ < div style = { { display : 'flex' , flexDirection : 'column' , gap : getSpacingPixels ( spacing ) } } >
678708 { /* Hero Section */ }
679709 < div
680710 className = "p-8 text-center"
@@ -883,7 +913,7 @@ export const ColorSchemeDialog: React.FC<ColorSchemeDialogProps> = ({ setDesignS
883913 className = "py-4"
884914 style = { { borderBottom : `1px solid ${ palette [ mode ] . accent } ` } }
885915 >
886- < button className = "flex w-full items-center justify-between text-left" >
916+ < button >
887917 < span
888918 className = "text-sm font-medium"
889919 style = { { color : palette [ mode ] . primary , fontFamily : font . join ( ', ' ) } }
0 commit comments