Skip to content

Commit 8152fc7

Browse files
Merge pull request #4 from RedHat-UX/NGUI-176-video-component
feat(NGUI-176): Video component
2 parents e0b5d0f + da2c213 commit 8152fc7

17 files changed

+2514
-1007
lines changed

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,15 @@ This npm package provides a collection of reusable Patternfly React components t
1010
## Provides:
1111

1212
- Patternfly React Components
13-
- ImageComponent
1413
- OneCardWrapper
14+
- ImageComponent
1515
- TableWrapper
16+
- VideoPlayerWrapper
17+
* Dynamic Component Renderer
18+
- DynamicComponents
19+
* Supported Components
20+
- `one-card`, `image`, `table`, `video-player`
21+
- `video-player` supports YouTube video URLs and direct video file URLs
1622

1723
## Installation
1824

@@ -122,6 +128,23 @@ function App() {
122128
}
123129
```
124130

131+
### VideoPlayer Component
132+
133+
```jsx
134+
import { VideoPlayerWrapper } from '@rhngui/patternfly-react-renderer';
135+
136+
const videoData = {
137+
component: "video-player",
138+
video: "https://www.youtube.com/embed/v-PjgYDrg70",
139+
video_img: "https://img.youtube.com/vi/v-PjgYDrg70/maxresdefault.jpg",
140+
title: "Toy Story Trailer"
141+
};
142+
143+
function App() {
144+
return <VideoPlayerWrapper {...videoData} />;
145+
}
146+
```
147+
125148
## Links
126149

127150
- [Documentation](https://redhat-ux.github.io/next-gen-ui-agent/guide/renderer/patternfly_npm/)

0 commit comments

Comments
 (0)