mirror of
https://github.com/lux-tel/session-desktop.git
synced 2026-10-30 20:33:24 +00:00
19 lines
584 B
TypeScript
19 lines
584 B
TypeScript
import type { CSSProperties, SessionDataTestId } from 'react';
|
|
import styled from 'styled-components';
|
|
|
|
const FileIconWrapper = styled.img<{ $iconSize: string }>`
|
|
height: ${({ $iconSize: iconSize }) => iconSize};
|
|
width: ${({ $iconSize: iconSize }) => iconSize};
|
|
`;
|
|
|
|
export type FileIconProps = {
|
|
iconSize: string;
|
|
src: string;
|
|
dataTestId?: SessionDataTestId;
|
|
style?: CSSProperties;
|
|
};
|
|
|
|
export const FileIcon = ({ iconSize, dataTestId, src, style }: FileIconProps) => {
|
|
return <FileIconWrapper $iconSize={iconSize} data-testid={dataTestId} style={style} src={src} />;
|
|
};
|