Skip to content

Commit

Permalink
✨ feat: 将 stylish 的接口从 styled 方法中移除,二者并不兼容
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Jan 21, 2023
1 parent 92ea31c commit 90809f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/functions/createGlobalStyle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { serializeStyles } from '@emotion/serialize';
import { memo } from 'react';

import { useTheme } from '@/hooks';
import { CSSStyle, Theme } from '@/types';
import { CSSStyle, StyledTheme } from '@/types';

export interface GlobalTheme {
theme: Theme;
theme: StyledTheme;
}

/**
Expand Down
4 changes: 3 additions & 1 deletion src/types/styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ import * as React from 'react';

import { Theme } from './theme';

export type StyledTheme = Omit<Theme, 'stylish'>;

export type StyledTags = {
[Tag in keyof JSX.IntrinsicElements]: CreateStyledComponent<
{
theme?: Theme;
theme?: StyledTheme;
as?: React.ElementType;
},
JSX.IntrinsicElements[Tag]
Expand Down

0 comments on commit 90809f9

Please sign in to comment.