generated from arvinxx/npm-template
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
67 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,29 @@ | ||
import { Theme } from '@/types/theme'; | ||
import { ArrayClassNamesArg } from '@emotion/css/create-instance'; | ||
import { CSSInterpolation, SerializedStyles } from '@emotion/serialize'; | ||
import { Interpolation } from '@emotion/styled'; | ||
|
||
export type CSSStyle<T = Theme> = Array<TemplateStringsArray | Interpolation<T>>; | ||
|
||
export { type CSSObject } from '@emotion/css'; | ||
export type { SerializedStyles } from '@emotion/serialize'; | ||
|
||
export interface CssUtil { | ||
(template: TemplateStringsArray, ...args: Array<CSSInterpolation>): SerializedStyles; | ||
(...args: Array<CSSInterpolation>): SerializedStyles; | ||
} | ||
|
||
export type ClassNamesArg = | ||
| undefined | ||
| null | ||
| string | ||
| boolean | ||
| { [className: string]: boolean | null | undefined } | ||
| ArrayClassNamesArg | ||
| SerializedStyles; | ||
|
||
/** | ||
* 可以传入多个 css 对象 或者 className 字符串,最终会合并成一个 className 字符串 | ||
* 支持入参:{SerializedStyles} | string | ||
*/ | ||
export type ClassNamesUtil = (...classNames: ClassNamesArg[]) => string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters