Skip to content

Commit

Permalink
feat(Pdf): fix charts
Browse files Browse the repository at this point in the history
  • Loading branch information
annatraussnig committed Feb 4, 2025
1 parent e640a4c commit 5bd4bab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 5 additions & 3 deletions packages/styleguide/src/components/Datawrapper/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useEffect, useRef, useState } from 'react'
import { Figure, FigureSize } from '../Figure'
import FigureImage from '../Figure/Image'
import { css } from 'glamor'
import { MAX_WIDTH } from '../Center'

declare global {
interface Window {
Expand Down Expand Up @@ -134,11 +135,12 @@ function DatawrapperInteractive({
// https://datawrapper.dwcdn.net/DW123ID/full.png -> 600px wide
function DatawrapperPrint({ datawrapperId }: { datawrapperId: string }) {
return (
<Figure>
<FigureImage
<figure>
<img
width={600}
src={`https://datawrapper.dwcdn.net/${datawrapperId}/full.png`}
/>
</Figure>
</figure>
)
}

Expand Down
2 changes: 0 additions & 2 deletions packages/styleguide/src/components/Figure/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react'
import PropTypes from 'prop-types'
import { css, merge, keyframes } from 'glamor'

import { mUp, mUpAndPrint } from '../../theme/mediaQueries'
Expand Down Expand Up @@ -283,7 +282,6 @@ export const FigureGroup = ({
attributes,
columns = 2,
size,
data,
}: FigureGroupProps) => {
return (
<figure
Expand Down

0 comments on commit 5bd4bab

Please sign in to comment.