Skip to content

Commit

Permalink
Feat: PTrailerDesc 컴포넌트 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
juriurj committed Oct 2, 2024
1 parent 58e4ca2 commit b09694a
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/components/PTrailerDesc/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Poster } from '@/components/Poster';
import * as S from './styles';
import { P16 } from '@/components/Text';

interface PTrailerDescProps {
src: string;
videoTitle: string;
width?: string;
}

export const PTrailerDesc = ({ src, videoTitle, width = '100%' }: PTrailerDescProps) => {
return (
<S.PTrailerDesc width={width}>
<Poster src={src} width="50px"></Poster>
<P16>{videoTitle}</P16>
</S.PTrailerDesc>
);
};
25 changes: 25 additions & 0 deletions src/components/PTrailerDesc/styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { styled } from 'styled-components';

export const PTrailerDesc = styled.div<{ width: string }>`
width: ${({ width }) => width};
display: flex;
align-items: center;
padding: 1rem;
border: 1px solid ${({ theme }) => theme.colors.gray};
border-radius: 1rem;
& > div {
border-radius: 0.5rem;
overflow: hidden;
flex-shrink: 0;
}
& > p {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
padding-left: 1rem;
font-weight: 700;
overflow: hidden;
text-overflow: ellipsis;
}
`;

0 comments on commit b09694a

Please sign in to comment.