Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Implement zero dependency #4

Merged
merged 19 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 5 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# React YouTube Playlist

An easy-to-use and responsive React component for displaying YouTube playlists on a web app. Create a beautiful gallery of YouTube videos.
A simple, easy-to-use, and responsive playlist component with a lightbox for displaying a beautiful gallery of YouTube videos in React apps.

![npm](https://img.shields.io/npm/v/@codesweetly/react-youtube-playlist) ![NPM](https://img.shields.io/npm/l/@codesweetly/react-youtube-playlist)

Expand Down Expand Up @@ -40,7 +40,6 @@ function App() {
<YouTubePlaylist
apiKey="YOUR_YOUTUBE_API_KEY"
playlistId="YOUR_YOUTUBE_PLAYLIST_ID"
uniqueName="THIS_PLAYLIST_INSTANCE_NAME"
/>
);
}
Expand Down Expand Up @@ -78,21 +77,6 @@ function App() {

**Note:** A playlist's ID is the list of characters after the **"list="** in the [URL](https://codesweetly.com/web-address-url)—for instance, `https://www.youtube.com/playlist?list=playlistID`.

</td>
</tr>
<tr>
<td><code>uniqueName</code></td>
<td>string</td>
<td><code>undefined</code></td>
<td>

**(Required)** A unique name for the `<YouTubePlaylist>` instance.

**Note:**

- No two `<YouTubePlaylist>` on a single page must have the same name.
- Use the [HTML `id` attribute's naming convention](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id) for the `uniqueName` props.

</td>
</tr>
</tbody>
Expand Down Expand Up @@ -133,13 +117,10 @@ The `YouTubePlaylist` package works _only_ as a Client Component because it uses
npm run build
```

## Dependencies

- [fslightbox-react](https://github.com/banthagroup/fslightbox-react)
- [prop-types](https://github.com/facebook/prop-types)
- [react](https://github.com/facebook/react)
- [react-loader-spinner](https://github.com/mhnpd/react-loader-spinner)

## Demo

https://codesweetly.com/react-youtube-playlist

## Support

🍵 [Buy me a coffee](https://www.buymeacoffee.com/codesweetly)
1 change: 1 addition & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { Config } from "jest";

const config: Config = {
testEnvironment: "jsdom",
setupFilesAfterEnv: ["<rootDir>/src/jestIntersectionObserverMock.ts"],
transform: {
"^.+\\.tsx?$": "ts-jest",
},
Expand Down
Loading
Loading