Skip to content

Commit 04241a9

Browse files
committed
feat: update the icon for branch source
1 parent 33aa93e commit 04241a9

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

src/Common/Helper.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ import {
4545
WebhookEventNameType,
4646
} from '../Shared'
4747
import { ReactComponent as ArrowDown } from '@Icons/ic-chevron-down.svg'
48-
import webhookIcon from '@Icons/ic-webhook.svg'
49-
import branchIcon from '@Icons/ic-branch.svg'
50-
import regexIcon from '@Icons/ic-regex.svg'
51-
import pullRequest from '@Icons/ic-pull-request.svg'
52-
import tagIcon from '@Icons/ic-tag.svg'
48+
import { ReactComponent as ICWebhook } from '@Icons/ic-webhook.svg'
49+
import { ReactComponent as ICBranch } from '@Icons/ic-branch.svg'
50+
import { ReactComponent as ICRegex } from '@Icons/ic-regex.svg'
51+
import { ReactComponent as ICPullRequest } from '@Icons/ic-pull-request.svg'
52+
import { ReactComponent as ICTag } from '@Icons/ic-tag.svg'
5353
import { SourceTypeMap } from '@Common/Common.service'
5454
import { getIsRequestAborted } from './Api'
5555

@@ -990,17 +990,17 @@ export const throttle = <T extends (...args: unknown[]) => unknown>(
990990
export const getBranchIcon = (sourceType, _isRegex?: boolean, webhookEventName?: string) => {
991991
if (sourceType === SourceTypeMap.WEBHOOK) {
992992
if (webhookEventName === WebhookEventNameType.PULL_REQUEST) {
993-
return pullRequest
993+
return <ICPullRequest className="scn-6" />
994994
}
995995
if (webhookEventName === WebhookEventNameType.TAG_CREATION) {
996-
return tagIcon
996+
return <ICTag className="scn-6" />
997997
}
998-
return webhookIcon
998+
return <ICWebhook />
999999
}
10001000
if (sourceType === SourceTypeMap.BranchRegex || _isRegex) {
1001-
return regexIcon
1001+
return <ICRegex className="fcn-6" />
10021002
}
1003-
return branchIcon
1003+
return <ICBranch className="fcn-6" />
10041004
}
10051005

10061006
// TODO: Might need to expose sandbox and referrer policy

src/Shared/Components/CICDHistory/CiPipelineSourceConfig.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,9 @@ export const CiPipelineSourceConfig = ({
124124
{!loading && (
125125
<div className="flex dc__gap-4">
126126
{showIcons && (
127-
<img
128-
src={getBranchIcon(sourceType, _isRegex, sourceValueBase)}
129-
alt="branch"
130-
className="icon-dim-12"
131-
/>
127+
<span className="icon-dim-12 flex dc__no-shrink dc__fill-available-space">
128+
{getBranchIcon(sourceType, _isRegex, sourceValueBase)}
129+
</span>
132130
)}
133131
{showTooltip && (
134132
<Tippy

0 commit comments

Comments
 (0)