Skip to content

Commit

Permalink
externalise default tag colour
Browse files Browse the repository at this point in the history
  • Loading branch information
rolodato committed Nov 15, 2024
1 parent d812016 commit aff5f86
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions frontend/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ export default {
githubIssue: 'GitHub Issue',
githubPR: 'Github PR',
},
defaultTagColor: '#3d4db6',
isCustomFlagsmithUrl:
Project.flagsmithClientAPI !== 'https://edge.api.flagsmith.com/api/v1/',
modals: {
Expand Down
5 changes: 4 additions & 1 deletion frontend/common/utils/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ const Utils = Object.assign({}, require('./base/_utils'), {
return typeof value === 'number'
},

colour(c: string, fallback = '#6837FC'): InstanceType<typeof Color> {
colour(
c: string,
fallback = Constants.defaultTagColor,
): InstanceType<typeof Color> {
let res: Color
try {
res = Color(c)
Expand Down

0 comments on commit aff5f86

Please sign in to comment.