Skip to content

Commit 5cece9e

Browse files
author
Chance Strickland
committed
update useRect signature
1 parent bb23e80 commit 5cece9e

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

packages/tabs/examples/animated-bar.example.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function ExampleAnimatedTab({ index, ...props }) {
8585

8686
// measure the size of our element, only listen to rect if active
8787
const ref = React.useRef();
88-
const rect = useRect(ref, isSelected);
88+
const rect = useRect(ref, { observe: isSelected });
8989

9090
// get the style changing function from context
9191
const setActiveRect = React.useContext(AnimatedContext);

website/src/pages/tabs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ With a little composition we can animate the selected tab bar.
808808

809809
// measure the size of our element, only listen to rect if active
810810
const ref = React.useRef();
811-
const rect = useRect(ref, isSelected);
811+
const rect = useRect(ref, { observe: isSelected });
812812

813813
// get the style changing function from context
814814
const setActiveRect = useContext(AnimatedContext);

website/src/styles/app.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,16 @@ button#hamburger {
332332
white-space: nowrap;
333333
}
334334

335+
[data-reach-slider-input][data-orientation="horizontal"] {
336+
padding-top: 30px;
337+
padding-bottom: 30px;
338+
}
339+
340+
[data-reach-slider-input][data-orientation="vertical"] {
341+
padding-left: 30px;
342+
padding-right: 30px;
343+
}
344+
335345
.alert-buttons {
336346
text-align: center;
337347
margin-top: 20px;

0 commit comments

Comments
 (0)