mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 09:25:27 +00:00
Hover animation for home button.
Fix svg alignment in foreign objects.
This commit is contained in:
@@ -6,11 +6,13 @@ export interface IconBaseProps<T> {
|
||||
attachment?: Attachment;
|
||||
|
||||
size: number;
|
||||
hover?: boolean;
|
||||
animate?: boolean;
|
||||
}
|
||||
|
||||
interface IconModifiers {
|
||||
square?: boolean;
|
||||
hover?: boolean;
|
||||
}
|
||||
|
||||
export default styled.svg<IconModifiers>`
|
||||
@@ -27,6 +29,14 @@ export default styled.svg<IconModifiers>`
|
||||
border-radius: 50%;
|
||||
`}
|
||||
}
|
||||
|
||||
${(props) =>
|
||||
props.hover &&
|
||||
css`
|
||||
&:hover .icon {
|
||||
filter: brightness(0.8);
|
||||
}
|
||||
`}
|
||||
`;
|
||||
|
||||
export const ImageIconBase = styled.img<IconModifiers>`
|
||||
@@ -38,4 +48,12 @@ export const ImageIconBase = styled.img<IconModifiers>`
|
||||
css`
|
||||
border-radius: 50%;
|
||||
`}
|
||||
|
||||
${(props) =>
|
||||
props.hover &&
|
||||
css`
|
||||
&:hover img {
|
||||
filter: brightness(0.8);
|
||||
}
|
||||
`}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user