mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 09:25:27 +00:00
Introduce new border radius variables for stable theming.
This commit is contained in:
@@ -11,7 +11,10 @@ export interface IconBaseProps<T> {
|
||||
}
|
||||
|
||||
interface IconModifiers {
|
||||
square?: boolean;
|
||||
/**
|
||||
* If this is undefined or null then the icon defaults to square, else uses the CSS variable given.
|
||||
*/
|
||||
borderRadius?: string;
|
||||
hover?: boolean;
|
||||
}
|
||||
|
||||
@@ -24,9 +27,9 @@ export default styled.svg<IconModifiers>`
|
||||
object-fit: cover;
|
||||
|
||||
${(props) =>
|
||||
!props.square &&
|
||||
props.borderRadius &&
|
||||
css`
|
||||
border-radius: var(--border-radius-half);
|
||||
border-radius: var(${props.borderRadius});
|
||||
`}
|
||||
}
|
||||
|
||||
@@ -44,9 +47,9 @@ export const ImageIconBase = styled.img<IconModifiers>`
|
||||
object-fit: cover;
|
||||
|
||||
${(props) =>
|
||||
!props.square &&
|
||||
props.borderRadius &&
|
||||
css`
|
||||
border-radius: var(--border-radius-half);
|
||||
border-radius: var(${props.borderRadius});
|
||||
`}
|
||||
|
||||
${(props) =>
|
||||
|
||||
Reference in New Issue
Block a user