diff --git a/src/components/PTrailer/index.tsx b/src/components/PTrailer/index.tsx
new file mode 100644
index 0000000..5e02370
--- /dev/null
+++ b/src/components/PTrailer/index.tsx
@@ -0,0 +1,19 @@
+import { PTrailerVideo } from '@/components/PTrailerVideo';
+import { PTrailerDesc } from '@/components/PTrailerDesc';
+import * as S from './styles';
+
+interface PTrailerProps {
+ postSrc: string;
+ vId: string;
+ vTitle: string;
+ width?: string;
+}
+
+export const PTrailer = ({ postSrc, vId, vTitle, width = '100%' }: PTrailerProps) => {
+ return (
+
+
+
+
+ );
+};
diff --git a/src/components/PTrailer/styles.ts b/src/components/PTrailer/styles.ts
new file mode 100644
index 0000000..4dcd87a
--- /dev/null
+++ b/src/components/PTrailer/styles.ts
@@ -0,0 +1,7 @@
+import { styled } from 'styled-components';
+
+export const PTrailer = styled.div<{ width: string }>`
+ width: ${({ width }) => width};
+ border-radius: 1rem;
+ overflow: hidden;
+`;
diff --git a/src/components/PTrailerDesc/index.tsx b/src/components/PTrailerDesc/index.tsx
index 2585904..f743178 100644
--- a/src/components/PTrailerDesc/index.tsx
+++ b/src/components/PTrailerDesc/index.tsx
@@ -4,15 +4,15 @@ import { P16 } from '@/components/Text';
interface PTrailerDescProps {
src: string;
- videoTitle: string;
+ vTitle: string;
width?: string;
}
-export const PTrailerDesc = ({ src, videoTitle, width = '100%' }: PTrailerDescProps) => {
+export const PTrailerDesc = ({ src, vTitle, width = '100%' }: PTrailerDescProps) => {
return (
- {videoTitle}
+ {vTitle}
);
};
diff --git a/src/components/PTrailerDesc/styles.ts b/src/components/PTrailerDesc/styles.ts
index a21eb75..78d2e80 100644
--- a/src/components/PTrailerDesc/styles.ts
+++ b/src/components/PTrailerDesc/styles.ts
@@ -6,7 +6,7 @@ export const PTrailerDesc = styled.div<{ width: string }>`
align-items: center;
padding: 1rem;
border: 1px solid ${({ theme }) => theme.colors.gray};
- border-radius: 1rem;
+ border-radius: 0 0 1rem 1rem;
& > div {
border-radius: 0.5rem;
diff --git a/src/components/PTrailerVideo/index.tsx b/src/components/PTrailerVideo/index.tsx
index ac9925f..c666a12 100644
--- a/src/components/PTrailerVideo/index.tsx
+++ b/src/components/PTrailerVideo/index.tsx
@@ -1,12 +1,12 @@
import * as S from './styles';
interface PTrailerVideoProps {
- src: string;
+ vId: string;
width?: string;
}
-export const PTrailerVideo = ({ src, width = '100%' }: PTrailerVideoProps) => {
+export const PTrailerVideo = ({ vId, width = '100%' }: PTrailerVideoProps) => {
return (
-
+
);
};