mirror of
https://github.com/harness/drone.git
synced 2025-05-09 07:59:38 +08:00
Adjust full diff icon size and stroke for clarification (#1104)
This commit is contained in:
parent
621dfe68b3
commit
421f5903d7
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user