Skip to content

Commit ad92694

Browse files
committed
fixed that wrappers page was not scrollable
1 parent a8ca386 commit ad92694

File tree

6 files changed

+67
-42
lines changed

6 files changed

+67
-42
lines changed

package-lock.json

Lines changed: 19 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
"process": "^0.11.10",
155155
"react": "^18.3.1",
156156
"react-dom": "^18.3.1",
157-
"rollup": "^4.21.3",
157+
"rollup": "4.21",
158158
"rollup-plugin-polyfill-node": "^0.13.0",
159159
"stylelint": "^16.9.0",
160160
"stylelint-config-standard": "^36.0.1",

showcase/public/showcase-sources.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import ShowcaseWrapperItem, {
88
function AccordionExample() {
99
return (
1010
<div className="bg-surface">
11-
<Accordion.Container type="single" defaultValue="item-1">
11+
<Accordion.Container type="single" defaultValue="item-1" data-id="test-data-id">
1212
<Accordion.Item value="item-1">
1313
<Accordion.Trigger>Is it accessible?</Accordion.Trigger>
1414
<Accordion.Content>
@@ -1396,7 +1396,7 @@ function ButtonShowcase(props: ShowcaseProps) {
13961396

13971397
//#region button
13981398
const lpExample = (
1399-
<ButtonGroup>
1399+
<ButtonGroup data-id="test-data-id">
14001400
<Button
14011401
appearance="default"
14021402
onClick={() => console.log("Button pressed")}
@@ -2209,6 +2209,7 @@ export default function CollapsibleShowcase(props: ShowcaseProps) {
22092209
<Collapsible
22102210
header={<h4>Collapsible Title</h4>}
22112211
openButtonPosition="left"
2212+
data-id="test-data-id"
22122213
>
22132214
<div className="p-4">collapsible content</div>
22142215
</Collapsible>

showcase/src/ShowcaseApp.tsx

Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import React, { useState } from "react"
1+
import { useState } from "react"
22
import ShowcaseTopNavigation from "./components/showcase/ShowcaseTopNavigation"
33
import ShowcaseLeftSidebar from "./components/showcase/ShowcaseLeftSidebar"
44
import { BrowserRouter, Navigate, Route, Routes } from "react-router-dom"
55
import IntroPage from "./page/IntroPage"
66
import NotFoundPage from "./page/NotFoundPage"
77

8-
import { AppLayout, LocaleProvider } from "@linked-planet/ui-kit-ts"
8+
import { AppLayout, LocaleProvider, PageLayout } from "@linked-planet/ui-kit-ts"
99
import SinglePage from "./page/SinglePage"
1010
import WrappersPage from "./page/WrappersPage"
1111

@@ -21,29 +21,46 @@ export default function ShowcaseApp() {
2121
<BrowserRouter basename="ui-kit-ts">
2222
<LocaleProvider>
2323
<AppLayout.Container>
24-
<ShowcaseTopNavigation
25-
sidebarPosition={sidebarPosition}
26-
setSidebarPosition={setSidebarPosition}
27-
/>
24+
<AppLayout.TopNavigation>
25+
<ShowcaseTopNavigation
26+
sidebarPosition={sidebarPosition}
27+
setSidebarPosition={setSidebarPosition}
28+
/>
29+
</AppLayout.TopNavigation>
30+
2831
<AppLayout.Content>
29-
<ShowcaseLeftSidebar position={sidebarPosition} />
30-
<AppLayout.Main className="overflow-hidden p-4">
31-
<Routes>
32-
<Route
33-
path="/"
34-
element={<Navigate to="/intro" />}
35-
/>
36-
<Route path="/intro" element={<IntroPage />} />
37-
<Route
38-
path="/wrappers"
39-
element={<WrappersPage />}
40-
/>
41-
<Route
42-
path="/single"
43-
element={<SinglePage />}
44-
/>
45-
<Route path="*" element={<NotFoundPage />} />
46-
</Routes>
32+
<ShowcaseLeftSidebar position="left" />
33+
<AppLayout.Main className="overflow-hidden">
34+
<PageLayout.Page>
35+
<PageLayout.PageBody>
36+
<PageLayout.PageBodyContent>
37+
<Routes>
38+
<Route
39+
path="/"
40+
element={
41+
<Navigate to="/intro" />
42+
}
43+
/>
44+
<Route
45+
path="/intro"
46+
element={<IntroPage />}
47+
/>
48+
<Route
49+
path="/wrappers"
50+
element={<WrappersPage />}
51+
/>
52+
<Route
53+
path="/single"
54+
element={<SinglePage />}
55+
/>
56+
<Route
57+
path="*"
58+
element={<NotFoundPage />}
59+
/>
60+
</Routes>
61+
</PageLayout.PageBodyContent>
62+
</PageLayout.PageBody>
63+
</PageLayout.Page>
4764
</AppLayout.Main>
4865
</AppLayout.Content>
4966
</AppLayout.Container>

showcase/src/components/showcase/ShowcaseLeftSidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useCallback } from "react"
1+
import { useCallback } from "react"
22
import useShowcases from "../../useShowcases"
33
import { useLocation, useNavigate } from "react-router-dom"
44
import {

showcase/src/page/WrappersPage.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ function WrappersPage() {
1717
}, [])
1818

1919
return (
20-
<div>
21-
<h1>Wrappers</h1>
20+
<>
2221
{Object.entries(scs).map(([id, component]) =>
2322
React.cloneElement(component, { id }),
2423
)}
25-
</div>
24+
</>
2625
)
2726
}
2827

0 commit comments

Comments
 (0)