From 241b9465c822cc83217611dedcc9610a5c01d0c5 Mon Sep 17 00:00:00 2001 From: maomao <1714487678@qq.com> Date: Sat, 18 Mar 2023 23:17:41 +0800 Subject: [PATCH] type: optimization type (#41326) --- components/divider/index.tsx | 2 +- components/empty/empty.tsx | 2 +- components/empty/simple.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/divider/index.tsx b/components/divider/index.tsx index 17bb372c8d..cab33801a0 100644 --- a/components/divider/index.tsx +++ b/components/divider/index.tsx @@ -57,7 +57,7 @@ const Divider: React.FC = (props) => { rootClassName, ); - const innerStyle = { + const innerStyle: React.CSSProperties = { ...(hasCustomMarginLeft && { marginLeft: orientationMargin }), ...(hasCustomMarginRight && { marginRight: orientationMargin }), }; diff --git a/components/empty/empty.tsx b/components/empty/empty.tsx index 2ed60950b2..c382a34ab3 100644 --- a/components/empty/empty.tsx +++ b/components/empty/empty.tsx @@ -2,7 +2,7 @@ import { TinyColor } from '@ctrl/tinycolor'; import * as React from 'react'; import { useToken } from '../theme/internal'; -const Empty = () => { +const Empty: React.FC = () => { const [, token] = useToken(); const bgColor = new TinyColor(token.colorBgBase); diff --git a/components/empty/simple.tsx b/components/empty/simple.tsx index caeeecc94a..f0b0dda188 100644 --- a/components/empty/simple.tsx +++ b/components/empty/simple.tsx @@ -3,7 +3,7 @@ import * as React from 'react'; import { useMemo } from 'react'; import { useToken } from '../theme/internal'; -const Simple = () => { +const Simple: React.FC = () => { const [, token] = useToken(); const { colorFill, colorFillTertiary, colorFillQuaternary, colorBgContainer } = token;