Skip to content

Commit

Permalink
✨ feat: 移除若干无用api 并调整样式表实例为 styleManager
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Feb 19, 2023
1 parent c68ccfa commit 8dafbc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
11 changes: 2 additions & 9 deletions src/functions/createInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ export const createInstance = (options: CreateOptions) => {

const emotion = createEmotion({ key: defaultKey, speedy: options.speedy });

const { cache, sheet, hydrate, injectGlobal, keyframes, flush, merge, getRegisteredStyles } =
emotion;
const { cache, injectGlobal, keyframes } = emotion;

const classNameGenerator = createClassNameGenerator(cache, options.hashPriority);
const cx = createCX(classNameGenerator, emotion.cx);
Expand Down Expand Up @@ -92,13 +91,7 @@ export const createInstance = (options: CreateOptions) => {
//******************** //
//**** 样式表管理 **** //
//******************** //
cache,
sheet,
flush,
merge,
hydrate,
getRegisteredStyles,
styleInstance: emotion,
styleManager: emotion,
// ******************** //
// ***** 主题相关 ***** //
// ******************** //
Expand Down
10 changes: 2 additions & 8 deletions src/functions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,13 @@ export const {
css,
cx,
keyframes,
//**** 样式表管理 **** //
styleInstance: emotion,
/**
* @deprecated
*/
injectGlobal,
flush,
hydrate,
sheet,
cache,
getRegisteredStyles,
//**** 样式表管理 **** //
styleManager,
// ***** 主题相关 ***** //
EmotionContext,
ThemeProvider,
StyleProvider,
useTheme,
Expand Down

0 comments on commit 8dafbc4

Please sign in to comment.