mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-14 19:25:02 -05:00
363789c825
Feature: Remember what channel was opened last. Channels: ESC to focus message box / cancel editing.
37 lines
700 B
TypeScript
37 lines
700 B
TypeScript
import { Attachment } from "revolt.js/dist/api/objects";
|
|
import styled, { css } from "styled-components";
|
|
|
|
export interface IconBaseProps<T> {
|
|
target?: T;
|
|
attachment?: Attachment;
|
|
|
|
size: number;
|
|
animate?: boolean;
|
|
}
|
|
|
|
interface IconModifiers {
|
|
square?: boolean
|
|
}
|
|
|
|
export default styled.svg<IconModifiers>`
|
|
flex-shrink: 0;
|
|
|
|
img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
|
|
${ props => !props.square && css`
|
|
border-radius: 50%;
|
|
` }
|
|
}
|
|
`;
|
|
|
|
export const ImageIconBase = styled.img<IconModifiers>`
|
|
flex-shrink: 0;
|
|
object-fit: cover;
|
|
|
|
${ props => !props.square && css`
|
|
border-radius: 50%;
|
|
` }
|
|
`;
|