Skip to content

Commit

Permalink
✨ feat: 移除 useEmotion 方法
Browse files Browse the repository at this point in the history
BREAKING CHANGES: 移除 useEmotion 方法,用户不应该感知内部实现的实例对象
  • Loading branch information
arvinxx committed Feb 26, 2023
1 parent c57e2ac commit 7f7a59e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
6 changes: 1 addition & 5 deletions src/functions/createInstance.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createContext, useContext } from 'react';
import { createContext } from 'react';

import { CacheManager, createCSS, createEmotion, serializeCSS } from '@/core';

Expand Down Expand Up @@ -103,8 +103,6 @@ export const createInstance = <T = any>(options: CreateOptions<T>) => {
prefix: defaultKey,
});

const useEmotion = () => useContext(EmotionContext);

return {
// ******************** //
// **** 样式生成相关 **** //
Expand All @@ -131,8 +129,6 @@ export const createInstance = <T = any>(options: CreateOptions<T>) => {
// ***** 主题相关 ***** //
// ******************** //
useTheme,
EmotionContext,
useEmotion,
StyleProvider,
ThemeProvider,
};
Expand Down
21 changes: 0 additions & 21 deletions tests/hooks/useEmotion.test.tsx

This file was deleted.

0 comments on commit 7f7a59e

Please sign in to comment.