Skip to content

Commit 680de66

Browse files
new styles added for GifPlayer component.
Signed-off-by: Michael Valdron <[email protected]> Signed-off-by: Michael Valdron <[email protected]>
1 parent f8a831c commit 680de66

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.container {
2+
display: block;
3+
margin-right: auto;
4+
margin-left: auto;
5+
width: 50%;
6+
height: 50%;
7+
}
8+
9+
@media only screen and (max-width: 1080px) {
10+
.container {
11+
width: 100%;
12+
height: 100%;
13+
}
14+
}
15+
16+
@media only screen and (max-width: 1280px) {
17+
.container {
18+
width: 75%;
19+
height: 75%;
20+
}
21+
}

src/components/GifPlayer/GifPlayer.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import React from 'react';
2+
import { Card } from '@patternfly/react-core';
3+
import styles from './GifPlayer.module.css';
24

35
export interface GifPlayerProps
46
extends React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> {
@@ -14,4 +16,8 @@ export const GifPlayer: React.FC<GifPlayerProps> = ({
1416
className = '',
1517
alt = 'loading...',
1618
...props
17-
}: GifPlayerProps) => <img {...props} className={className} src={src} alt={alt} />;
19+
}: GifPlayerProps) => (
20+
<Card className={styles.container}>
21+
<img {...props} className={className} src={src} alt={alt} />
22+
</Card>
23+
);

0 commit comments

Comments
 (0)