MCPcopy Create free account
hub / github.com/callstack/react-native-paper / TabbedTable

Function TabbedTable

docs/src/components/ThemeColorsTable.tsx:65–106  ·  view source on GitHub ↗
({
  themeColorsData,
  uniqueKeys,
}: {
  themeColorsData: DataObject;
  uniqueKeys: string[];
})

Source from the content-addressed store, hash-verified

63};
64
65const TabbedTable = ({
66 themeColorsData,
67 uniqueKeys,
68}: {
69 themeColorsData: DataObject;
70 uniqueKeys: string[];
71}): ReactNode => {
72 const tabTableContent = Object.keys(themeColorsData).map((key) => {
73 const modes = themeColorsData[key] as DataObject;
74 const rows = Object.keys(modes).map((mode) => {
75 return (
76 <tr key={`${key}-${mode}`}>
77 <td>{mode}</td>
78 {getTableCell(uniqueKeys, modes[mode] as DataObject)}
79 </tr>
80 );
81 });
82 return (
83 <TabItem label={key} value={key} key={key}>
84 <table>
85 <thead>
86 <tr>
87 <th>mode</th>
88 {getTableHeader(uniqueKeys)}
89 </tr>
90 </thead>
91 <tbody>{rows}</tbody>
92 </table>
93 </TabItem>
94 );
95 });
96
97 return (
98 <>
99 <Admonition type="info">
100 The table below outlines the theme colors, specifically for MD3{' '}
101 <i>(theme version 3)</i> at the moment.
102 </Admonition>
103 <Tabs>{tabTableContent}</Tabs>
104 </>
105 );
106};
107
108const ThemeColorsTable = ({
109 themeColorsData,

Callers

nothing calls this directly

Calls 2

getTableCellFunction · 0.85
getTableHeaderFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…