Skip to content

Commit 407bae4

Browse files
ops: minor updates
1 parent 5464931 commit 407bae4

File tree

3 files changed

+19
-15
lines changed

3 files changed

+19
-15
lines changed

packages/core/css/theme/_utilities.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
background-color: var(--bg-color-invert);
228228
}
229229

230-
@utility text-base {
230+
@utility text-reset {
231231
color: var(--text-color-base);
232232
}
233233

packages/core/src/hooks/useResizeObserver.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,18 @@ export const useResizeObserver = <T extends HTMLElement = HTMLDivElement>(
3232
const ref = useRef<T>(null);
3333
const [, startTransition] = useTransition();
3434

35-
const callbackResize = useDebounce(() => {
36-
startTransition(() => {
37-
if (onResize && ref.current != null) {
38-
const { offsetWidth: width, offsetHeight: height } = ref.current;
39-
onResize?.({ width, height });
40-
}
41-
});
42-
}, [onResize]);
35+
const callbackResize = useDebounce(
36+
() => {
37+
startTransition(() => {
38+
if (onResize && ref.current != null) {
39+
const { offsetWidth: width, offsetHeight: height } = ref.current;
40+
onResize?.({ width, height });
41+
}
42+
});
43+
},
44+
[onResize],
45+
0,
46+
);
4347

4448
useEffect(() => {
4549
if (ref.current != null) {

packages/core/stories/0.core/Theme.stories.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ const Sample = memo(() => (
161161
<div className="flex-1 capitalize text-center font-medium text-warning-600">
162162
warning
163163
</div>
164-
<div className="flex-1 capitalize text-center font-medium text-base">
165-
base
164+
<div className="flex-1 capitalize text-center font-medium text-reset">
165+
reset
166166
</div>
167167
<div className="flex-1 capitalize text-center font-medium text-dimmed">
168168
dimmed
@@ -337,15 +337,15 @@ const Sample = memo(() => (
337337
</Divider>
338338
<Row orient="col">
339339
<Col>
340-
<ProgressBar color="primary" value={63} animate />
340+
<ProgressBar color="primary-500" value={63} animate />
341341
</Col>
342342
<Col>
343-
<ProgressBar color="accent" value={42} animate />
343+
<ProgressBar color="accent-500" value={42} animate />
344344
</Col>
345345
<Col className="span-6 overflow-hidden" stretchContent>
346346
<div className="flex gap-4 justify-center items-center p-4">
347-
<ProgressCircle size="md" color="primary" value={42} />
348-
<ProgressCircle size="md" color="accent" value={63} />
347+
<ProgressCircle size="md" color="primary-500" value={42} />
348+
<ProgressCircle size="md" color="accent-500" value={63} />
349349
</div>
350350
</Col>
351351
</Row>

0 commit comments

Comments
 (0)