From 239158afc4fa04d1ba9e9e20527eebb088cb8d5f Mon Sep 17 00:00:00 2001 From: arvinxx Date: Thu, 2 Feb 2023 23:00:26 +0800 Subject: [PATCH] =?UTF-8?q?:label:=20chore:=20=E4=BC=98=E5=8C=96=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/functions/createGlobalStyle.tsx | 4 ++-- src/functions/createStyles/response.ts | 2 +- src/types/function.ts | 5 ----- src/types/styled.ts | 5 ++--- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/functions/createGlobalStyle.tsx b/src/functions/createGlobalStyle.tsx index 3f844737..4e0dd73f 100644 --- a/src/functions/createGlobalStyle.tsx +++ b/src/functions/createGlobalStyle.tsx @@ -3,10 +3,10 @@ import { serializeStyles } from '@emotion/serialize'; import { memo } from 'react'; import { useTheme } from '@/hooks'; -import { CSSStyle, StyledTheme } from '@/types'; +import { CSSStyle, Theme } from '@/types'; export interface GlobalTheme { - theme: StyledTheme; + theme: Theme; } /** diff --git a/src/functions/createStyles/response.ts b/src/functions/createStyles/response.ts index d39510fd..95b5244b 100644 --- a/src/functions/createStyles/response.ts +++ b/src/functions/createStyles/response.ts @@ -3,7 +3,7 @@ import { reactCss } from '@/pedestal'; import type { Breakpoint, BreakpointMapParams, CSSObject, ResponsiveMap } from '@/types'; import { isReactCssResult } from '@/utils'; import { convertBreakpointToResponsive } from '@/utils/responsive'; -import type { SerializedStyles } from '@emotion/react'; +import type { SerializedStyles } from '@emotion/serialize'; import { useMemo } from 'react'; export const useMediaQueryMap = (): ResponsiveMap => { diff --git a/src/types/function.ts b/src/types/function.ts index bb4ca57d..78e92f9d 100644 --- a/src/types/function.ts +++ b/src/types/function.ts @@ -12,11 +12,6 @@ export interface EmotionReactCss { (...args: Array): SerializedStyles; } -export interface UtilReactCss { - (template: TemplateStringsArray, ...args: Array): string; - (...args: Array): string; -} - export type EmotionCX = (...classNames: ClassNamesArg[]) => string; export type BreakpointMapParams = Partial>; diff --git a/src/types/styled.ts b/src/types/styled.ts index 51cd393e..429453d3 100644 --- a/src/types/styled.ts +++ b/src/types/styled.ts @@ -9,12 +9,10 @@ import * as React from 'react'; import { Theme } from './theme'; -export type StyledTheme = Omit; - export type StyledTags = { [Tag in keyof JSX.IntrinsicElements]: CreateStyledComponent< { - theme?: StyledTheme; + theme?: Theme; as?: React.ElementType; }, JSX.IntrinsicElements[Tag] @@ -93,4 +91,5 @@ export interface CreateStyled { options?: StyledOptions, ): CreateStyledComponent<{ theme?: Theme; as?: React.ElementType }, JSX.IntrinsicElements[Tag]>; } + export interface CreateStyled extends BaseCreateStyled, StyledTags {}