🐛 Fix white iframe borders

This commit is contained in:
Manuel Ruwe
2022-12-30 15:28:30 +01:00
parent e85bc8c9b9
commit 0964e10b43

View File

@@ -26,7 +26,6 @@ export const DashDotGraph = ({ graph, isCompact, dashDotUrl }: DashDotGraphProps
key={graph.name} key={graph.name}
title={graph.name} title={graph.name}
src={useIframeSrc(dashDotUrl, graph, isCompact)} src={useIframeSrc(dashDotUrl, graph, isCompact)}
frameBorder="0"
/> />
</Stack> </Stack>
); );
@@ -40,7 +39,7 @@ const useIframeSrc = (dashDotUrl: string, graph: GraphType, isCompact: boolean)
return ( return (
`${dashDotUrl}` + `${dashDotUrl}` +
`?singleGraphMode=true` + '?singleGraphMode=true' +
`&graph=${graphId}` + `&graph=${graphId}` +
`&theme=${colorScheme}` + `&theme=${colorScheme}` +
`&surface=${surface}` + `&surface=${surface}` +
@@ -56,6 +55,8 @@ export const useStyles = createStyles((theme, _params, getRef) => ({
maxWidth: '100%', maxWidth: '100%',
height: '140px', height: '140px',
borderRadius: theme.radius.lg, borderRadius: theme.radius.lg,
border: 'none',
colorScheme: 'light', // fixes white borders around iframe
}, },
graphTitle: { graphTitle: {
ref: getRef('graphTitle'), ref: getRef('graphTitle'),