updated element sizing in ivans widget
This commit is contained in:
@@ -144,13 +144,14 @@ export default function IvansAlerts({ settings, widgetID }) {
|
|||||||
pos="relative"
|
pos="relative"
|
||||||
justify="top" align="center"
|
justify="top" align="center"
|
||||||
p={2} gap={2}
|
p={2} gap={2}
|
||||||
overflowY="auto"
|
overflow="auto"
|
||||||
borderRadius="xl"
|
borderRadius="xl"
|
||||||
bg="gray.800"
|
bg="gray.800"
|
||||||
>
|
>
|
||||||
{data.map((item, index) => {
|
{data.map((item, index) => {
|
||||||
return (
|
return (
|
||||||
<Collapsible.Root key={index} w="100%">
|
<Collapsible.Root key={index} w="100%">
|
||||||
|
{/* Using context to dynamically change the border radii of the triggers */}
|
||||||
<Collapsible.Context>
|
<Collapsible.Context>
|
||||||
{(collapsible) => (
|
{(collapsible) => (
|
||||||
<>
|
<>
|
||||||
@@ -172,17 +173,18 @@ export default function IvansAlerts({ settings, widgetID }) {
|
|||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Collapsible.Trigger>
|
</Collapsible.Trigger>
|
||||||
<Collapsible.Content w="100%" h="100%">
|
<Collapsible.Content w="100%" h="auto">
|
||||||
<Box p={1} pl={2} borderBottomRadius="lg" bg="gray.700/45">
|
{/* This box needs to be at h="100%" for the pdf toolbar to appear */}
|
||||||
<Text textAlign="left" color="gray.100">{item?.summary}</Text>
|
<Box w="100%" h="100%" p={1} pl={2} borderBottomRadius="lg" bg="gray.700/45">
|
||||||
|
<Text fontSize="sm" textAlign="left" color="gray.100">{item?.summary}</Text>
|
||||||
<br />
|
<br />
|
||||||
{item?.files?.map((file, index) => {
|
{item?.files?.map((file, index) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<Box w="100%" h="100%" key={index} p={1}>
|
||||||
<object key={index}
|
<object
|
||||||
data={`${file?.url}#view=FitH&toolbar=1`}
|
data={`${file?.url}#view=FitH&toolbar=1`}
|
||||||
type="application/pdf"
|
type="application/pdf"
|
||||||
style={{ width: '100%', height: '100%', display: 'block' }}
|
style={{ width: '100%', height: '100%', display: 'block' }}
|
||||||
>
|
>
|
||||||
<Flex w="100%" h="100%" p={4} color="gray.400">
|
<Flex w="100%" h="100%" p={4} color="gray.400">
|
||||||
<Text mb={2} color="fg.muted">
|
<Text mb={2} color="fg.muted">
|
||||||
@@ -194,7 +196,7 @@ export default function IvansAlerts({ settings, widgetID }) {
|
|||||||
</Flex>
|
</Flex>
|
||||||
</object>
|
</object>
|
||||||
<br />
|
<br />
|
||||||
</>
|
</Box>
|
||||||
)})}
|
)})}
|
||||||
</Box>
|
</Box>
|
||||||
</Collapsible.Content>
|
</Collapsible.Content>
|
||||||
|
|||||||
Reference in New Issue
Block a user