UNPKG

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