UNPKG

726 BTypeScriptView Raw
1import { ComponentType } from 'react'
2
3interface NativeSlotProps {
4 /** 指定插入的 slot 位置
5 * @default none
6 * @supported weapp, swan, alipay, tt, jd, qq
7 */
8 name?: string
9}
10
11/** 编译的原生组件支持使用 slot 插槽
12 * @classification viewContainer
13 * @supported weapp, swan, alipay, tt, jd, qq
14 * @version 3.5.7+
15 * @example
16 * ```tsx
17 * import { NativeSlot, View } from '@tarojs/components'
18 *
19 * export default function () {
20 * render () {
21 * return (
22 * <View>
23 * <NativeSlot />
24 * </View>
25 * )
26 * }
27 * }
28 * ```
29 * @see https://github.com/NervJS/taro/pull/12627
30 */
31declare const NativeSlot: ComponentType<NativeSlotProps>
32
33export { NativeSlot, NativeSlotProps }