From 9b50fe1887bb5bb57daf4f980715b01cba1215c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Thu, 13 Feb 2020 16:54:17 +0800 Subject: [PATCH] types(SwitchCell): fix SwitchEvents --- src/switch-cell/index.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/switch-cell/index.tsx b/src/switch-cell/index.tsx index a07f8fcf2..21d3173b0 100644 --- a/src/switch-cell/index.tsx +++ b/src/switch-cell/index.tsx @@ -4,7 +4,7 @@ import { inherit } from '../utils/functional'; // Components import Cell from '../cell'; -import Switch, { SwitchEvents } from '../switch'; +import Switch from '../switch'; import { switchProps, SharedSwitchProps } from '../switch/shared'; // Types @@ -18,6 +18,10 @@ export type SwitchCellProps = SharedSwitchProps & { cellSize?: string; }; +export type SwitchCellEvents = { + onChange?(checked: boolean): void; +}; + const [createComponent, bem] = createNamespace('switch-cell'); function SwitchCell( @@ -54,4 +58,4 @@ SwitchCell.props = { }, }; -export default createComponent(SwitchCell); +export default createComponent(SwitchCell);