mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-08-26 22:29:24 +00:00

Better tool flow for reusability Pinning Styling of tool flow consumption of files after tooling --------- Co-authored-by: Connor Yoh <connor@stirlingpdf.com> Co-authored-by: James Brunton <jbrunton96@gmail.com>
27 lines
673 B
TypeScript
27 lines
673 B
TypeScript
import React from 'react';
|
|
import { Stack, Text } from '@mantine/core';
|
|
import { formatFileSize, getFileDate } from '../../../utils/fileUtils';
|
|
|
|
export interface FileMetadataProps {
|
|
file: File;
|
|
}
|
|
|
|
const FileMetadata = ({ file }: FileMetadataProps) => {
|
|
return (
|
|
<Stack gap="xs" style={{ flex: 1, minWidth: 0 }}>
|
|
<Stack gap="0.125rem">
|
|
<Text size="xs" c="dimmed">
|
|
{formatFileSize(file.size)}
|
|
</Text>
|
|
<Text size="xs" c="dimmed">
|
|
{file.type || 'Unknown'}
|
|
</Text>
|
|
<Text size="xs" c="dimmed">
|
|
{getFileDate(file)}
|
|
</Text>
|
|
</Stack>
|
|
</Stack>
|
|
);
|
|
};
|
|
|
|
export default FileMetadata; |