Adjust full diff icon size and stroke for clarification (#1104)

This commit is contained in:
Tan Nhu 2024-03-06 08:43:15 +00:00 committed by Harness
parent 621dfe68b3
commit 421f5903d7

View File

@ -335,6 +335,8 @@ const DiffViewerInternal: React.FC<DiffViewerProps> = ({
} }
}, [useFullDiff, memorizedState, diff.filePath, cancelGetFullDiff, getFullDiff, fullDiffLoading]) }, [useFullDiff, memorizedState, diff.filePath, cancelGetFullDiff, getFullDiff, fullDiffLoading])
const ToggleFullDiffIcon = useMemo(() => (useFullDiff ? Collapse : Expand), [useFullDiff])
return ( return (
<Container <Container
ref={containerRef} ref={containerRef}
@ -351,7 +353,7 @@ const DiffViewerInternal: React.FC<DiffViewerProps> = ({
size={ButtonSize.SMALL} size={ButtonSize.SMALL}
onClick={() => setCollapsed(!collapsed)} onClick={() => setCollapsed(!collapsed)}
iconProps={{ iconProps={{
size: 10, size: 12,
style: { style: {
color: '#383946', color: '#383946',
flexGrow: 1, flexGrow: 1,
@ -366,7 +368,7 @@ const DiffViewerInternal: React.FC<DiffViewerProps> = ({
className={css.expandCollapseDiffBtn} className={css.expandCollapseDiffBtn}
onClick={toggleFullDiff} onClick={toggleFullDiff}
title={getString(useFullDiff ? 'pr.collapseFullFile' : 'pr.expandFullFile')}> title={getString(useFullDiff ? 'pr.collapseFullFile' : 'pr.expandFullFile')}>
{useFullDiff ? <Collapse width="16" height="16" /> : <Expand width="16" height="16" />} <ToggleFullDiffIcon width="16" height="16" strokeWidth="2" />
</Button> </Button>
<Text <Text
inline inline