mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-18 00:55:50 +00:00
26 lines
580 B
JavaScript
26 lines
580 B
JavaScript
import { Text } from '@mantine/core';
|
|
|
|
// Short preview that triggers the details modal when clicked
|
|
const RecordingSynopsis = ({ description, onOpen }) => {
|
|
const truncated = description?.length > 140;
|
|
const preview = truncated
|
|
? `${description.slice(0, 140).trim()}...`
|
|
: description;
|
|
|
|
if (!description) return null;
|
|
|
|
return (
|
|
<Text
|
|
size="xs"
|
|
c="dimmed"
|
|
lineClamp={2}
|
|
title={description}
|
|
onClick={() => onOpen?.()}
|
|
style={{ cursor: 'pointer' }}
|
|
>
|
|
{preview}
|
|
</Text>
|
|
);
|
|
};
|
|
|
|
export default RecordingSynopsis;
|