Skip to content

Commit

Permalink
Remove now-unnecessary app window aspectRatio prop
Browse files Browse the repository at this point in the history
  • Loading branch information
pimterry committed Aug 23, 2024
1 parent d5c1dea commit 35efa72
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/components/elements/app-window/app-window.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,12 @@ export const VideoWindowButtons = styled.svg.attrs({
height: calc(var(--video-top-bar) * 3/4);
`;

export const VideoWindowContents = styled.div<{
$aspectRatio: string
}>`
export const VideoWindowContents = styled.div`
@container style(--theme: light) {
border-top: solid 1px var(--darkish-grey);
}
width: 100%;
height: 100%;
line-height: 0;
aspect-ratio: ${p => p.$aspectRatio};
`;
3 changes: 1 addition & 2 deletions src/components/elements/app-window/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
} from './app-window.styles';

export const AppWindow = (p: {
aspectRatio: string,
children: React.ReactNode
}) =>
<VideoWindowBorder>
Expand All @@ -16,7 +15,7 @@ export const AppWindow = (p: {
<circle cx="175" cy="50" r="25"/>
<circle cx="275" cy="50" r="25"/>
</VideoWindowButtons>
<VideoWindowContents $aspectRatio={p.aspectRatio}>
<VideoWindowContents>
{ p.children }
</VideoWindowContents>
</VideoWindowBorder>;
2 changes: 1 addition & 1 deletion src/components/sections/cta/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export const CTA = ({
)}

{video && (
<AppWindow aspectRatio='16/9'>
<AppWindow>
<BunnyVideoPlayer
videoId={video.id}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const IntegrationTextAppVideo = ({ title, subtitle, video }: {
<AltHeadingBlock title={title} subtitle={subtitle} mediumHeading />
</StyledIntegrationTextVideoHeading>

<AppWindow aspectRatio='16/9'>
<AppWindow>
<BunnyVideoPlayer
videoId={video.id}
/>
Expand Down

0 comments on commit 35efa72

Please sign in to comment.