// Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; import { getExtensionForDisplay } from '../types/Attachment.js'; import { isFileDangerous } from '../util/isFileDangerous.js'; import { tw } from '../axo/tw.js'; export type PropsType = Readonly[0]>; export function FileThumbnail(props: PropsType): JSX.Element { const extension = getExtensionForDisplay(props) ?? ''; const isDangerous = isFileDangerous(props.fileName || ''); return (
3 ? 'text-[9px]' : '', 'type-caption whitespace-nowrap' )} > {extension} {isDangerous ? (
) : null}
); }