Skip to content

Commit 8b34c79

Browse files
committed
tmp
1 parent bb06c15 commit 8b34c79

File tree

6 files changed

+69
-7
lines changed

6 files changed

+69
-7
lines changed

.tkb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,15 @@
3434
"a7ksr41sN7kQNaH8Io-dV": {
3535
"id": "a7ksr41sN7kQNaH8Io-dV",
3636
"description": "Add support for css modules",
37-
"columnId": "column-todo"
37+
"columnId": "column-done"
3838
}
3939
},
4040
"columns": [
4141
{
4242
"id": "column-todo",
4343
"title": "To do",
4444
"tasksIds": [
45-
"p1R-Q4atxMo-29mSa7mb6",
46-
"a7ksr41sN7kQNaH8Io-dV"
45+
"p1R-Q4atxMo-29mSa7mb6"
4746
]
4847
},
4948
{
@@ -57,6 +56,7 @@
5756
"id": "column-done",
5857
"title": "Done",
5958
"tasksIds": [
59+
"a7ksr41sN7kQNaH8Io-dV",
6060
"RtA7NBfPOlfnVHqk54rMD",
6161
"fqhes_YS14GQopOUs7K-7",
6262
"task-ZJpp-dpxx3KxRMsAPNuMC",

packages/shared-ui/src/lib-examples/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { Logo } from "../common/logo";
22
import SimpleColorSwitch from "./simple-color-switch";
33
import ThemeSwitching from "./theme-switching";
4+
import styles from "./lib-examples.module.css";
45

56
export default function LibExamples() {
67
return (
7-
<div>
8+
<div className={styles["lib-example-container"]}>
89
<h1>
910
<Logo /> examples.
1011
</h1>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.lib-example-container {
2+
display: flex;
3+
align-items: center;
4+
gap: 20px;
5+
flex-wrap: wrap;
6+
}
7+
8+
.example {
9+
min-width: 200px;
10+
min-height: 200px;
11+
flex-grow: 1;
12+
border-radius: 20px;
13+
}
14+
15+
.example * {
16+
background: var(--bg-color);
17+
}
18+
19+
20+
.lib-example-container h1 {
21+
text-align: center;
22+
width: 100%;
23+
}
Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
import { ColorSwitch, ThemeSwitcher } from "nthul";
2+
import { ServerTarget } from "nthul/server";
3+
import styles from "../lib-examples.module.css";
4+
5+
const targetId = "simple-color-switch";
16
export default function SimpleColorSwitch() {
2-
return <div></div>;
7+
return (
8+
<div className={styles.example}>
9+
<ServerTarget targetId={targetId} />
10+
<ThemeSwitcher targetId={targetId} />
11+
<header>
12+
<ColorSwitch targetId={targetId} />
13+
</header>
14+
</div>
15+
);
316
}
Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1-
export default function ThemeSwitching() {
2-
return <div></div>;
1+
import { ColorSwitch, ThemeSwitcher } from "nthul";
2+
import { ServerTarget } from "nthul/server";
3+
import styles from "../lib-examples.module.css";
4+
5+
const targetId = "theme-switching";
6+
const themes = ["theme1", "theme2"];
7+
export default function SimpleColorSwitch() {
8+
return (
9+
<div className={styles.example}>
10+
<ServerTarget targetId={targetId} />
11+
<ThemeSwitcher targetId={targetId} />
12+
<header>
13+
<ColorSwitch targetId={targetId} />
14+
</header>
15+
<main>
16+
<select name="" id="">
17+
{themes.map(th => (
18+
<option value={th} key={th}>
19+
{th}
20+
</option>
21+
))}
22+
</select>
23+
</main>
24+
</div>
25+
);
326
}

packages/shared-ui/src/root-layout.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { Cards } from "./cards";
88
import { Description } from "./root/description";
99
import { Hero } from "./root/hero";
1010
import { Footer } from "./root/footer";
11+
import LibExamples from "./lib-examples";
1112

1213
export type SharedRootLayoutProps = HTMLProps<HTMLElement>;
1314

@@ -19,6 +20,7 @@ export function SharedRootLayout({ children, className = "", ...props }: SharedR
1920
<Description />
2021
{children}
2122
<Hero />
23+
<LibExamples />
2224
<Cards />
2325
</main>
2426
<Footer />

0 commit comments

Comments
 (0)