add open pdf button in ivans widget

This commit is contained in:
2026-08-18 14:50:37 -07:00
parent dab9b8227e
commit f2637c7469
+13 -1
View File
@@ -183,8 +183,13 @@ export default function IvansAlerts({ settings, widgetID }) {
return (
<Box w="100%" h="100%" key={index} p={1}>
<br />
<Flex mb={2}>
<Flex mb={2} justify="space-between">
<Text pl={1} pr={1} bg="gray.600/50" borderRadius="md" fontSize="xs" color="gray.300">{file?.name}</Text>
<Box borderRadius="lg" bg="gray.700" color="gray.300" pl={1} pr={1} fontSize={13} asChild>
<a href={`${file?.url}#view=FitV&toolbar=1`} target="_blank" rel="noopener noreferrer">
Open
</a>
</Box>
</Flex>
<object
data={`${file?.url}#view=FitH&toolbar=1`}
@@ -200,6 +205,13 @@ export default function IvansAlerts({ settings, widgetID }) {
</a>
</Flex>
</object>
{/*<Flex w="100%" h="100%" justify="center" pt={4} color="gray.400">*/}
{/* <Button variant="subtle" asChild>*/}
{/* <a href={`${file?.url}#view=FitV&toolbar=1`} target="_blank" rel="noopener noreferrer">*/}
{/* View in New Page*/}
{/* </a>*/}
{/* </Button>*/}
{/*</Flex>*/}
</Box>
)})}
</Box>