diff --git a/react/customizeColumns/src/CustomizeColumns.tsx b/react/customizeColumns/src/Example/CustomizeColumns.tsx similarity index 90% rename from react/customizeColumns/src/CustomizeColumns.tsx rename to react/customizeColumns/src/Example/CustomizeColumns.tsx index 5c039f7..e87be3a 100644 --- a/react/customizeColumns/src/CustomizeColumns.tsx +++ b/react/customizeColumns/src/Example/CustomizeColumns.tsx @@ -28,9 +28,8 @@ import { restrictToVerticalAxis, } from '@dnd-kit/modifiers'; import { verticalListSortingStrategy } from '@dnd-kit/sortable'; -import { ExampleLink } from './ExampleLink'; import { Launch } from '@carbon/react/icons'; -import * as packageJson from '../package.json'; +import * as packageJson from '../../package.json'; type Resource = { id: string; @@ -97,24 +96,6 @@ export const CustomizeColumns = () => { - - - - } style={{ width: table.getCenterTotalSize(), }}> diff --git a/react/customizeColumns/src/Example/Example.tsx b/react/customizeColumns/src/Example/Example.tsx new file mode 100644 index 0000000..268f44d --- /dev/null +++ b/react/customizeColumns/src/Example/Example.tsx @@ -0,0 +1,12 @@ +import { Grid, Column } from '@carbon/react'; +import { CustomizeColumns } from './CustomizeColumns'; + +export const Example = () => { + return ( + + + + + + ); +}; diff --git a/react/customizeColumns/src/customTypings.d.ts b/react/customizeColumns/src/Example/customTypings.d.ts similarity index 100% rename from react/customizeColumns/src/customTypings.d.ts rename to react/customizeColumns/src/Example/customTypings.d.ts diff --git a/react/customizeColumns/src/drag-drop/GridContainer.tsx b/react/customizeColumns/src/Example/drag-drop/GridContainer.tsx similarity index 100% rename from react/customizeColumns/src/drag-drop/GridContainer.tsx rename to react/customizeColumns/src/Example/drag-drop/GridContainer.tsx diff --git a/react/customizeColumns/src/drag-drop/Item.tsx b/react/customizeColumns/src/Example/drag-drop/Item.tsx similarity index 100% rename from react/customizeColumns/src/drag-drop/Item.tsx rename to react/customizeColumns/src/Example/drag-drop/Item.tsx diff --git a/react/customizeColumns/src/drag-drop/ListContainer.tsx b/react/customizeColumns/src/Example/drag-drop/ListContainer.tsx similarity index 100% rename from react/customizeColumns/src/drag-drop/ListContainer.tsx rename to react/customizeColumns/src/Example/drag-drop/ListContainer.tsx diff --git a/react/customizeColumns/src/drag-drop/Sortable.tsx b/react/customizeColumns/src/Example/drag-drop/Sortable.tsx similarity index 100% rename from react/customizeColumns/src/drag-drop/Sortable.tsx rename to react/customizeColumns/src/Example/drag-drop/Sortable.tsx diff --git a/react/customizeColumns/src/drag-drop/SortableItem.tsx b/react/customizeColumns/src/Example/drag-drop/SortableItem.tsx similarity index 100% rename from react/customizeColumns/src/drag-drop/SortableItem.tsx rename to react/customizeColumns/src/Example/drag-drop/SortableItem.tsx diff --git a/react/customizeColumns/src/drag-drop/Underlay.tsx b/react/customizeColumns/src/Example/drag-drop/Underlay.tsx similarity index 100% rename from react/customizeColumns/src/drag-drop/Underlay.tsx rename to react/customizeColumns/src/Example/drag-drop/Underlay.tsx diff --git a/react/customizeColumns/src/App.scss b/react/customizeColumns/src/Example/example.scss similarity index 100% rename from react/customizeColumns/src/App.scss rename to react/customizeColumns/src/Example/example.scss diff --git a/react/customizeColumns/src/Example/index.ts b/react/customizeColumns/src/Example/index.ts new file mode 100644 index 0000000..8765fbd --- /dev/null +++ b/react/customizeColumns/src/Example/index.ts @@ -0,0 +1 @@ +export { Example } from './Example'; diff --git a/react/customizeColumns/src/makeData.ts b/react/customizeColumns/src/Example/makeData.ts similarity index 100% rename from react/customizeColumns/src/makeData.ts rename to react/customizeColumns/src/Example/makeData.ts diff --git a/react/customizeColumns/src/ExampleLink.tsx b/react/customizeColumns/src/ExampleLink.tsx deleted file mode 100644 index 7a03b61..0000000 --- a/react/customizeColumns/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/customizeColumns/src/index.scss b/react/customizeColumns/src/index.scss index 8965062..aff3609 100644 --- a/react/customizeColumns/src/index.scss +++ b/react/customizeColumns/src/index.scss @@ -2,22 +2,11 @@ $font-path: '@ibm/plex' ); @use '@carbon/styles/scss/type'; +@use '@carbon/styles/scss/spacing' as *; @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; + margin-top: $spacing-10; } diff --git a/react/customizeColumns/src/index.ts b/react/customizeColumns/src/index.ts deleted file mode 100644 index 1f170e5..0000000 --- a/react/customizeColumns/src/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { CustomizeColumns } from './CustomizeColumns'; - -export { CustomizeColumns }; diff --git a/react/customizeColumns/src/main.tsx b/react/customizeColumns/src/main.tsx index 53d80eb..26b45da 100644 --- a/react/customizeColumns/src/main.tsx +++ b/react/customizeColumns/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 { CustomizeColumns } from './CustomizeColumns'; - import './index.scss'; +import { Example } from './Example'; const renderUIShellHeader = () => ( ( createRoot(document.getElementById('root')!).render( {renderUIShellHeader()} - - - - - + ); diff --git a/react/customizeColumns/tsconfig.app.json b/react/customizeColumns/tsconfig.app.json index a68cf5e..a6e3949 100644 --- a/react/customizeColumns/tsconfig.app.json +++ b/react/customizeColumns/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"]