diff --git a/packages/cell-group/index.js b/packages/cell-group/index.tsx similarity index 64% rename from packages/cell-group/index.js rename to packages/cell-group/index.tsx index 1b0203c4f..7ecd8acbb 100644 --- a/packages/cell-group/index.js +++ b/packages/cell-group/index.tsx @@ -1,9 +1,17 @@ import { use } from '../utils'; import { inherit } from '../utils/functional'; +// Types +import { FunctionalComponent } from '../utils/use/sfc'; + const [sfc, bem] = use('cell-group'); -function CellGroup(h, props, slots, ctx) { +const CellGroup: FunctionalComponent = function ( + h, + props, + slots, + ctx +) { return (
); -} +}; + +export type CellGroupProps = { + border?: boolean +}; CellGroup.props = { border: { diff --git a/packages/loading/index.tsx b/packages/loading/index.tsx index 7440a5690..fbd64155e 100644 --- a/packages/loading/index.tsx +++ b/packages/loading/index.tsx @@ -46,6 +46,12 @@ const Loading: FunctionalComponent = function( ); }; +export type LoadingProps = { + size?: string; + type?: string; + color?: string; +}; + Loading.props = { size: String, type: { @@ -58,10 +64,4 @@ Loading.props = { } }; -export type LoadingProps = { - size?: string; - type?: string; - color?: string; -}; - export default sfc(Loading);