@@ -539,28 +539,30 @@ const TaskStepItem: React.FC<{
539539 ) ;
540540
541541 return (
542- < div className = { `bg-white dark:bg-gray-800/50 p-3 rounded-lg border border-gray-200 dark:border-gray-700 space-y-2 transition-opacity ${ ! isEnabled ? 'opacity-50' : '' } ` } >
543- < div className = "flex items-center justify-between" >
544- < div className = "flex items-center gap-3" >
545- { hasDetails && (
546- < button
547- type = "button"
548- onClick = { ( ) => setIsCollapsed ( prev => ! prev ) }
549- aria-label = { `${ isCollapsed ? 'Expand' : 'Collapse' } step details` }
550- aria-expanded = { ! isCollapsed }
551- aria-controls = { detailsId }
552- className = "p-1.5 text-gray-500 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full"
553- >
554- { isCollapsed ? < ChevronRightIcon className = "h-4 w-4" /> : < ChevronDownIcon className = "h-4 w-4" /> }
555- </ button >
556- ) }
542+ < div className = { `bg-white dark:bg-gray-800/50 px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-700 space-y-2 transition-opacity ${ ! isEnabled ? 'opacity-50' : '' } ` } >
543+ < div className = "flex items-center justify-between gap-3" >
544+ < div className = "flex items-center gap-2" >
545+ < div className = "flex h-6 w-6 items-center justify-center" >
546+ { hasDetails ? (
547+ < button
548+ type = "button"
549+ onClick = { ( ) => setIsCollapsed ( prev => ! prev ) }
550+ aria-label = { `${ isCollapsed ? 'Expand' : 'Collapse' } step details` }
551+ aria-expanded = { ! isCollapsed }
552+ aria-controls = { detailsId }
553+ className = "p-0.5 text-gray-500 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full"
554+ >
555+ { isCollapsed ? < ChevronRightIcon className = "h-4 w-4" /> : < ChevronDownIcon className = "h-4 w-4" /> }
556+ </ button >
557+ ) : null }
558+ </ div >
557559 < Icon className = "h-6 w-6 text-blue-500" />
558560 < div >
559561 < p className = "font-semibold text-gray-800 dark:text-gray-200" > { label } </ p >
560562 < p className = "text-xs text-gray-500" > Step { index + 1 } </ p >
561563 </ div >
562564 </ div >
563- < div className = "flex items-center space-x-2 " >
565+ < div className = "flex items-center space-x-1.5 " >
564566 < label { ...toggleTooltip } className = "relative inline-flex items-center cursor-pointer" >
565567 < input type = "checkbox" checked = { isEnabled } onChange = { ( e ) => onStepChange ( step . id , { enabled : e . target . checked } ) } className = "sr-only peer" />
566568 < div className = "w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-blue-500/50 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600" > </ div >
@@ -571,28 +573,28 @@ const TaskStepItem: React.FC<{
571573 onClick = { ( ) => onMoveStep ( index , 'top' ) }
572574 disabled = { index === 0 }
573575 aria-label = "Move step to top"
574- className = "p-1.5 disabled:opacity-30 text-gray-500 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full"
576+ className = "p-1 disabled:opacity-30 text-gray-500 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full"
575577 >
576578 < ChevronsUpIcon className = "h-4 w-4" />
577579 </ button >
578- < button type = "button" onClick = { ( ) => onMoveStep ( index , 'up' ) } disabled = { index === 0 } className = "p-1.5 disabled:opacity-30 text-gray-500 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full" > < ArrowUpIcon className = "h-4 w-4" /> </ button >
579- < button type = "button" onClick = { ( ) => onMoveStep ( index , 'down' ) } disabled = { index === totalSteps - 1 } className = "p-1.5 disabled:opacity-30 text-gray-500 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full" > < ArrowDownIcon className = "h-4 w-4" /> </ button >
580+ < button type = "button" onClick = { ( ) => onMoveStep ( index , 'up' ) } disabled = { index === 0 } className = "p-1 disabled:opacity-30 text-gray-500 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full" > < ArrowUpIcon className = "h-4 w-4" /> </ button >
581+ < button type = "button" onClick = { ( ) => onMoveStep ( index , 'down' ) } disabled = { index === totalSteps - 1 } className = "p-1 disabled:opacity-30 text-gray-500 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full" > < ArrowDownIcon className = "h-4 w-4" /> </ button >
580582 < button
581583 { ...moveToBottomTooltip }
582584 type = "button"
583585 onClick = { ( ) => onMoveStep ( index , 'bottom' ) }
584586 disabled = { index === totalSteps - 1 }
585587 aria-label = "Move step to bottom"
586- className = "p-1.5 disabled:opacity-30 text-gray-500 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full"
588+ className = "p-1 disabled:opacity-30 text-gray-500 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full"
587589 >
588590 < ChevronsDownIcon className = "h-4 w-4" />
589591 </ button >
590- < button { ...duplicateTooltip } type = "button" onClick = { ( ) => onDuplicateStep ( index ) } className = "p-1.5 text-gray-500 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full" > < DocumentDuplicateIcon className = "h-4 w-4" /> </ button >
591- < button type = "button" onClick = { ( ) => onRemoveStep ( step . id ) } className = "p-1.5 text-red-500 hover:bg-red-100 dark:hover:bg-red-900/50 rounded-full" > < TrashIcon className = "h-4 w-4" /> </ button >
592+ < button { ...duplicateTooltip } type = "button" onClick = { ( ) => onDuplicateStep ( index ) } className = "p-1 text-gray-500 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full" > < DocumentDuplicateIcon className = "h-4 w-4" /> </ button >
593+ < button type = "button" onClick = { ( ) => onRemoveStep ( step . id ) } className = "p-1 text-red-500 hover:bg-red-100 dark:hover:bg-red-900/50 rounded-full" > < TrashIcon className = "h-4 w-4" /> </ button >
592594 </ div >
593595 </ div >
594596 { hasDetails ? (
595- < div id = { detailsId } className = { `mt-3 space-y-3 ${ isCollapsed ? 'hidden' : '' } ` } >
597+ < div id = { detailsId } className = { `mt-2 space-y-2 ${ isCollapsed ? 'hidden' : '' } ` } >
596598 { detailFields }
597599 </ div >
598600 ) : (
0 commit comments