diff --git a/react/dynamic-nested-rows/src/DynamicNestedRows.tsx b/react/dynamic-nested-rows/src/Example/DynamicNestedRows.tsx similarity index 90% rename from react/dynamic-nested-rows/src/DynamicNestedRows.tsx rename to react/dynamic-nested-rows/src/Example/DynamicNestedRows.tsx index 44f48d1..635ab25 100644 --- a/react/dynamic-nested-rows/src/DynamicNestedRows.tsx +++ b/react/dynamic-nested-rows/src/Example/DynamicNestedRows.tsx @@ -14,9 +14,8 @@ const { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } = DataTable; import { makeData, Resource } from './makeData'; -import { ExampleLink } from './ExampleLink'; import { Launch } from '@carbon/react/icons'; -import * as packageJson from '../package.json'; +import * as packageJson from '../../package.json'; export const DynamicNestedRows = () => { const [data, setData] = React.useState(() => makeData(5)); @@ -130,27 +129,7 @@ export const DynamicNestedRows = () => { }); return ( - - - - - }> + {table.getHeaderGroups().map((headerGroup) => ( diff --git a/react/dynamic-nested-rows/src/Example/Example.tsx b/react/dynamic-nested-rows/src/Example/Example.tsx new file mode 100644 index 0000000..1925a26 --- /dev/null +++ b/react/dynamic-nested-rows/src/Example/Example.tsx @@ -0,0 +1,13 @@ +import { Grid, Column } from '@carbon/react'; +import { DynamicNestedRows } from './DynamicNestedRows'; +import './example.scss'; + +export const Example = () => { + return ( + + + + + + ); +}; diff --git a/react/dynamic-nested-rows/src/customTypings.d.ts b/react/dynamic-nested-rows/src/Example/customTypings.d.ts similarity index 100% rename from react/dynamic-nested-rows/src/customTypings.d.ts rename to react/dynamic-nested-rows/src/Example/customTypings.d.ts diff --git a/react/dynamic-nested-rows/src/App.scss b/react/dynamic-nested-rows/src/Example/example.scss similarity index 100% rename from react/dynamic-nested-rows/src/App.scss rename to react/dynamic-nested-rows/src/Example/example.scss diff --git a/react/dynamic-nested-rows/src/Example/index.ts b/react/dynamic-nested-rows/src/Example/index.ts new file mode 100644 index 0000000..8765fbd --- /dev/null +++ b/react/dynamic-nested-rows/src/Example/index.ts @@ -0,0 +1 @@ +export { Example } from './Example'; diff --git a/react/dynamic-nested-rows/src/makeData.ts b/react/dynamic-nested-rows/src/Example/makeData.ts similarity index 100% rename from react/dynamic-nested-rows/src/makeData.ts rename to react/dynamic-nested-rows/src/Example/makeData.ts diff --git a/react/dynamic-nested-rows/src/ExampleLink.tsx b/react/dynamic-nested-rows/src/ExampleLink.tsx deleted file mode 100644 index 7a03b61..0000000 --- a/react/dynamic-nested-rows/src/ExampleLink.tsx +++ /dev/null @@ -1,9 +0,0 @@ -export const ExampleLink = ({ icon, label, url }) => { - const Icon = icon; - return ( - - {icon && } - {label} - - ); -}; diff --git a/react/dynamic-nested-rows/src/index.scss b/react/dynamic-nested-rows/src/index.scss index 8965062..e3f9104 100644 --- a/react/dynamic-nested-rows/src/index.scss +++ b/react/dynamic-nested-rows/src/index.scss @@ -3,21 +3,8 @@ ); @use '@carbon/styles/scss/type'; @use '@carbon/ibm-products/css/index'; -@use './App'; body { margin: 0; padding: 0; } - -.example--link { - @include type.type-style('label-01'); - - display: flex; - align-items: center; - margin-right: 0.5rem; -} - -.example--link__icon { - margin-right: 0.25rem; -} diff --git a/react/dynamic-nested-rows/src/index.ts b/react/dynamic-nested-rows/src/index.ts deleted file mode 100644 index cfc5941..0000000 --- a/react/dynamic-nested-rows/src/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { DynamicNestedRows } from './DynamicNestedRows'; - -export { DynamicNestedRows }; diff --git a/react/dynamic-nested-rows/src/main.tsx b/react/dynamic-nested-rows/src/main.tsx index 637b188..26b45da 100644 --- a/react/dynamic-nested-rows/src/main.tsx +++ b/react/dynamic-nested-rows/src/main.tsx @@ -2,16 +2,13 @@ import { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; import { CodeSnippet, - Column, - Grid, Header, HeaderContainer, HeaderName, } from '@carbon/react'; -import { DynamicNestedRows } from './DynamicNestedRows'; - import './index.scss'; +import { Example } from './Example'; const renderUIShellHeader = () => ( ( createRoot(document.getElementById('root')!).render( {renderUIShellHeader()} - - - - - + ); diff --git a/react/dynamic-nested-rows/tsconfig.app.json b/react/dynamic-nested-rows/tsconfig.app.json index a68cf5e..a6e3949 100644 --- a/react/dynamic-nested-rows/tsconfig.app.json +++ b/react/dynamic-nested-rows/tsconfig.app.json @@ -21,7 +21,7 @@ "noUnusedParameters": true, "noFallthroughCasesInSwitch": true, - "types": [ "./src/customTypings.d.ts" ], + "types": ["./src/Example/customTypings.d.ts"], "resolveJsonModule": true }, "include": ["./src"]