-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
APP-306: update colors for project pages (#2506)
- Loading branch information
Showing
19 changed files
with
155 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
web-components/src/components/cards/CredibilityCard/CredibilityCard.utils.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export const getBackground = (index: number, value: number) => { | ||
const percentage = `${Math.min(100, 55 + index * value)}%`; | ||
// eslint-disable-next-line lingui/no-unlocalized-strings | ||
return `linear-gradient(-8deg, #F1F7F6 ${percentage}, transparent ${percentage})`; | ||
return `linear-gradient(-8deg, rgba(var(--sc-card-credibility-diagonal-background) / 1) ${percentage}, transparent ${percentage})`; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 15 additions & 4 deletions
19
web-components/src/components/icons/utils/SvgColorOverride.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,39 @@ | ||
import { useMemo } from 'react'; | ||
import { SvgIcon, SxProps } from '@mui/material'; | ||
|
||
export default function SvgThemeWrapper({ | ||
export default function SvgColorOverride({ | ||
src, | ||
sx, | ||
color, | ||
filterIntensity = 10, | ||
alt, | ||
className, | ||
}: { | ||
src: string; | ||
sx?: SxProps; | ||
color: string; | ||
filterIntensity?: number; | ||
alt?: string; | ||
className?: string; | ||
}) { | ||
const maskId = useMemo(() => `mask_${Math.random()}`, []); | ||
return ( | ||
<SvgIcon sx={sx}> | ||
<SvgIcon sx={sx} aria-label={alt} className={className}> | ||
<mask id={maskId}> | ||
<image | ||
href={src} | ||
// filter: 'brightness(10)' is used to make the image full intensity for the mask | ||
style={{ filter: 'brightness(10)' }} | ||
style={{ filter: `brightness(${filterIntensity})` }} | ||
height="100%" | ||
width="100%" | ||
/> | ||
</mask> | ||
<rect mask={`url(#${maskId})`} width="100%" height="100%" fill={color} /> | ||
<rect | ||
mask={`url(#${maskId})`} | ||
width="100%" | ||
height="100%" | ||
style={{ fill: color }} | ||
/> | ||
</SvgIcon> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function isString(value: unknown): value is string { | ||
return typeof value === 'string'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.