Skip to content

Commit ddfc158

Browse files
feat: add zustand playground (#3209)
* feat: add zustand playground * use another playground * fix styles --------- Co-authored-by: daishi <[email protected]>
1 parent f999022 commit ddfc158

File tree

2 files changed

+25
-14
lines changed

2 files changed

+25
-14
lines changed

examples/demo/src/components/Details.jsx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,17 @@ export default function Details() {
66
<a href="https://github.com/pmndrs/zustand">Github</a>
77
</nav>
88
<div className="bottom">
9-
<a
10-
href="https://github.com/pmndrs/zustand/tree/main/examples/demo"
11-
className="bottom-right"
12-
>
13-
{'<Source />'}
14-
</a>
15-
<a
16-
href="https://www.instagram.com/tina.henschel/"
17-
className="bottom-left"
18-
>
9+
<a href="https://www.instagram.com/tina.henschel/">
1910
Illustrations @ Tina Henschel
2011
</a>
12+
<div className="bottom-links">
13+
<a href="https://github.com/pmndrs/zustand/tree/main/examples/demo">
14+
{'<Source />'}
15+
</a>
16+
<a href="https://stackblitz.com/github/pmndrs/zustand/tree/main/examples/starter?file=src%2Findex.tsx">
17+
{'<Playground />'}
18+
</a>
19+
</div>
2120
</div>
2221
<span className="header-left">Zustand</span>
2322
</>

examples/demo/src/styles.css

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,26 @@ a {
158158
flex: 0 0 auto;
159159
}
160160

161-
a.bottom-left {
161+
.bottom {
162+
position: fixed;
162163
bottom: 40px;
163164
left: 40px;
165+
right: 40px;
166+
display: flex;
167+
flex-wrap: wrap;
168+
align-items: center;
169+
justify-content: space-between;
170+
gap: 12px;
164171
}
165172

166-
a.bottom-right {
167-
bottom: 40px;
168-
right: 40px;
173+
.bottom a {
174+
position: static;
175+
}
176+
177+
.bottom-links {
178+
display: flex;
179+
gap: 16px;
180+
align-items: center;
169181
}
170182

171183
.snippet-container {

0 commit comments

Comments
 (0)