Skip to content

Commit 467c3a9

Browse files
committed
chore: add context to viz
1 parent d429c97 commit 467c3a9

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

examples/next-ts/pages/bottom-sheet.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default function Page() {
3737
</main>
3838

3939
<Toolbar controls={controls.ui} viz>
40-
<StateVisualizer state={service} />
40+
<StateVisualizer state={service} context={["snapPointOffset", "dragOffset"]} />
4141
</Toolbar>
4242
</>
4343
)

shared/src/css/bottom-sheet.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
[data-scope="bottom-sheet"][data-part="content"] {
1616
background: white;
17-
transform: translate3d(0, 100%, 0);
17+
transform: translate3d(0, -100%, 0);
1818
transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
1919
display: flex;
2020
flex-direction: column;
@@ -31,6 +31,10 @@
3131
&[data-state="open"] {
3232
transform: translate3d(0, var(--snap-point-height, 0), 0);
3333
}
34+
35+
&[data-state="closed"] {
36+
transform: translate3d(0, -100%, 0);
37+
}
3438
}
3539

3640
[data-scope="bottom-sheet"][data-part="grabber"] {

0 commit comments

Comments
 (0)