Skip to content

Commit

Permalink
Remove PlaceholderSVG xmlns, refactor maxHeight and maxWidth properties
Browse files Browse the repository at this point in the history
  • Loading branch information
mcbouslog committed Jan 29, 2025
1 parent cecd104 commit e6d5b39
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import styled, { css } from 'styled-components'
const StyledPlaceholderSVG = styled.svg`
background: no-repeat center / cover url('https://static.zooniverse.org/www.zooniverse.org/assets/fe-project-subject-placeholder-800x600.png');
touch-action: pinch-zoom;
max-width: ${props => props.maxWidth};
${props => props.maxHeight && css`max-height: ${props.maxHeight};`}
max-width: ${props => props.$maxWidth};
${props => props.$maxHeight && css`max-height: ${props.$maxHeight};`}
`

function PlaceholderSVG({
Expand All @@ -17,11 +17,10 @@ function PlaceholderSVG({
<StyledPlaceholderSVG
data-testid='placeholder-svg'
focusable
maxHeight={maxHeight}
maxWidth={maxWidth}
$maxHeight={maxHeight}
$maxWidth={maxWidth}
tabIndex={0}
viewBox={viewBox}
xmlns='http://www.w3.org/2000/svg'
/>
)
}
Expand Down

0 comments on commit e6d5b39

Please sign in to comment.