From b17617d63cc33d633e303a9d882e62dc5eec789d Mon Sep 17 00:00:00 2001 From: wwsun Date: Thu, 29 Sep 2022 09:42:45 +0800 Subject: [PATCH] fix: fix return types of coral --- src/coral.ts | 8 ++++++-- src/theme.ts | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/coral.ts b/src/coral.ts index d185b66..bd78667 100644 --- a/src/coral.ts +++ b/src/coral.ts @@ -26,7 +26,11 @@ interface CoralOption

{ * @param options 自定义选项 * @returns react component */ -export function coral(component: T, initCss?: CoralProps['css'], options?: CoralOption

) { +export function coral( + component: T, + initCss?: CoralProps['css'], + options?: CoralOption

, +): CoralComponent { const attrs = typeof options?.attrs === 'function' ? options?.attrs : () => options?.attrs; const shouldForward = options?.shouldForwardProp || shouldForwardProp; return styled(component as React.ComponentType) @@ -40,5 +44,5 @@ export function coral(component: T, initCss?: CoralProps[' ${initCss} ${allStyledProps} ${cssProps} - ` as CoralComponent; + `; } diff --git a/src/theme.ts b/src/theme.ts index 3f9a352..745d801 100644 --- a/src/theme.ts +++ b/src/theme.ts @@ -127,6 +127,7 @@ export const defaultTheme: ThemeType = { focus: 'colors.primary.60', hover: 'colors.primary.50', active: 'colors.primary.70', + disabled: 'colors.primary.10', }, background: { normal: 'colors.gray.10',