Set album view gradient brightness based on theme

This commit is contained in:
jeffvli
2021-11-04 17:29:16 -07:00
committed by Jeff
parent d1e2b3ae1e
commit bf025e396b
2 changed files with 6 additions and 2 deletions

View File

@@ -287,7 +287,11 @@ export const BlurredBackground = styled.img<{ expanded: boolean; image: string }
`;
export const GradientBackground = styled.div<{ $expanded: boolean; $color: string }>`
background: ${(props) => `linear-gradient(0deg, transparent 10%, ${props.$color} 100%)`};
background: ${(props) =>
`linear-gradient(0deg, transparent 10%, ${props.$color.replace(
',1)',
`${props.theme.type === 'dark' ? ',0.2' : ',0.5'})`
)} 100%)`};
top: 32px;
left: ${(props) => (props.$expanded ? '165px' : '56px')};
height: calc(100% - 130px);

View File

@@ -198,7 +198,7 @@ const ArtistView = ({ ...rest }: any) => {
})
.then((color) => {
return setImageAverageColor({
color: color.rgba.replace(',1)', ',0.4)'),
color: color.rgba,
loaded: true,
});
})