Skip to content

Commit 567d8ec

Browse files
committed
refactor: rename with zeroRuntime
1 parent 39c6338 commit 567d8ec

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/hooks/useToken.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export interface UseTokenReturn<
3030
prefix?: string;
3131
key?: string;
3232
};
33-
disabledRuntimeStyle?: boolean;
33+
zeroRuntime?: boolean;
3434
}
3535

3636
export type UseToken<

src/util/genStyleUtils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,11 @@ function genStyleUtils<
297297

298298
// Return new style hook
299299
return (prefixCls: string, rootCls: string = prefixCls): string => {
300-
const { theme, realToken, hashId, token, cssVar, disabledRuntimeStyle } = useToken();
300+
const { theme, realToken, hashId, token, cssVar, zeroRuntime } = useToken();
301301

302302
// Update of `disabledRuntimeStyle` would cause React hook error, so memoized it and never update.
303-
const memoizedDisabledRuntimeStyle = useMemo(() => disabledRuntimeStyle, []);
304-
if (memoizedDisabledRuntimeStyle) {
303+
const memoizedZeroRuntime = useMemo(() => zeroRuntime, []);
304+
if (memoizedZeroRuntime) {
305305
return hashId;
306306
}
307307

tests/genStyleUtils.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ describe('genStyleUtils', () => {
155155
hashId: 'hash',
156156
token: {},
157157
cssVar: {},
158-
disabledRuntimeStyle: true,
158+
zeroRuntime: true,
159159
}),
160160
usePrefix,
161161
}

0 commit comments

Comments
 (0)