chore: render see more button conditionally

This commit is contained in:
ValdiANS
2026-01-27 18:16:34 +07:00
parent b03a47ddc6
commit a094eb94a5
+20 -18
View File
@@ -176,24 +176,26 @@ const ApprovalStepsV2 = ({
})} })}
</div> </div>
<Button {formattedApprovals.length > maxVisibleSteps && (
variant='outline' <Button
color='none' variant='outline'
onClick={seeMoreClickHandler} color='none'
className={cn( onClick={seeMoreClickHandler}
'px-3 py-2 gap-2.5 text-sm text-base-content/50 border border-base-content/10 rounded-lg transition-all' className={cn(
)} 'px-3 py-2 gap-2.5 text-sm text-base-content/50 border border-base-content/10 rounded-lg transition-all'
> )}
<Icon >
icon='heroicons-outline:chevron-double-down' <Icon
width={20} icon='heroicons-outline:chevron-double-down'
height={20} width={20}
className={cn('transition-all duration-300', { height={20}
'-rotate-180': isSeeAll, className={cn('transition-all duration-300', {
})} '-rotate-180': isSeeAll,
/> })}
See {isSeeAll ? 'Less' : 'More'} />
</Button> See {isSeeAll ? 'Less' : 'More'}
</Button>
)}
</div> </div>
); );
}; };