Skip to content

Commit

Permalink
feat(project): add playlist screen and container
Browse files Browse the repository at this point in the history
  • Loading branch information
demmyhonore committed Apr 29, 2021
1 parent 6c4832a commit ccba942
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/containers/Playlist/Playlist.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.playlist {
color: var(--primary-color);
font-family: var(--body-alt-font-family);
}
11 changes: 11 additions & 0 deletions src/containers/Playlist/Playlist.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';
import { render } from '@testing-library/react';

import Playlist from './Playlist';

describe('<Playlist>', () => {
it.skip('renders with heading', () => {
const { getByText } = render(<Playlist playlistId="123" />);
expect(getByText(/aa/i)).toBeTruthy();
});
});
21 changes: 21 additions & 0 deletions src/containers/Playlist/Playlist.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';

import styles from './Playlist.module.scss';

type PlaylistContainerProps = {
playlistId: string;
};

function Playlist({ playlistId }: PlaylistContainerProps): JSX.Element {
return (
<div className={styles.playlist}>
<header className={styles.playlistHeader}>
<h2 className={styles.playlistTitle}>All films</h2>
<div className={styles.playlistCategory} />
</header>
<main className={styles.playlistGrid} />
</div>
);
}

export default Playlist;
3 changes: 3 additions & 0 deletions src/screens/Playlist/Playlist.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.playlist {
padding-top: 20px;
}
16 changes: 16 additions & 0 deletions src/screens/Playlist/Playlist.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react';

import PlaylistContainer from '../../containers/Playlist/Playlist'

import styles from './Playlist.module.scss';


function Playlist() {
return (
<div className={styles.playlist}>
<PlaylistContainer playlistId="sR5VypYk" />
</div>
);
}

export default Playlist;

0 comments on commit ccba942

Please sign in to comment.