@@ -13,8 +13,6 @@ This npm package provides a collection of reusable Patternfly React components t
1313 - ImageComponent
1414 - OneCardWrapper
1515 - TableWrapper
16- - Dynamic Component Renderer
17- - DynamicComponents
1816
1917## Installation
2018
@@ -82,6 +80,48 @@ function App() {
8280}
8381```
8482
83+ ### Table Component
84+
85+ ``` jsx
86+ import { DynamicComponent } from " @rhngui/patternfly-react-renderer" ;
87+
88+ const tableConfig = {
89+ component: " table" ,
90+ title: " Movie Statistics" ,
91+ id: " movie-stats-table" ,
92+ fields: [
93+ {
94+ name: " Movie Title" ,
95+ data_path: " movies.title" ,
96+ data: [" Toy Story" , " Finding Nemo" , " The Incredibles" ],
97+ },
98+ {
99+ name: " Release Year" ,
100+ data_path: " movies.year" ,
101+ data: [1995 , 2003 , 2004 ],
102+ },
103+ {
104+ name: " Genres" ,
105+ data_path: " movies.genres" ,
106+ data: [
107+ [" Animation" , " Adventure" ],
108+ [" Animation" , " Adventure" ],
109+ [" Animation" , " Action" ],
110+ ],
111+ },
112+ {
113+ name: " Rating" ,
114+ data_path: " movies.rating" ,
115+ data: [8.3 , 8.1 , 8.0 ],
116+ },
117+ ],
118+ };
119+
120+ function App () {
121+ return < DynamicComponent config= {tableConfig} / > ;
122+ }
123+ ```
124+
85125## Links
86126
87127- [ Documentation] ( https://redhat-ux.github.io/next-gen-ui-agent/guide/renderer/patternfly_npm/ )
0 commit comments