import React from 'react'; import type { ViewProps } from '@tarojs/components'; import type { PaddingProps, MarginProps, BackgroundProps, BorderRadiusProps, BorderProps } from '@lx-react-materiel/shared'; import { type Required as IRequired } from 'utility-types'; import './index.less'; type PickViewProps = Pick; interface LxItemProps extends PaddingProps, MarginProps, BackgroundProps, BorderRadiusProps, BorderProps, PickViewProps { label?: string; leftColor?: string; leftSize?: number; value?: string | number; rightColor?: string; rightSize?: number; valueOnClick?: Pick['onClick']; slotLeft?: React.ReactNode; slotRight?: React.ReactNode; } /** * 仅仅有 slot 用法 * slotLeft & slotRight 是必备属性 * 其他属性是可选属性 */ export type IOnlySlot = IRequired, 'slotLeft' | 'slotRight'>; /** * 传递 slotLeft 场景 * slotLeft & value 是必备属性,其他是可选属性 */ export type IOnlySlotLeft = IRequired, 'slotLeft' | 'value'>; /** * 传递 slotRight 场景 * slotRight & label 是必备属性,其他是可选属性 */ export type IOnlySlotRight = IRequired, 'slotRight' | 'label'>; /** * 没有 slot 场景。默认 * label & value 是必备属性,其他是可选属性 */ export type INotSlot = IRequired, 'label' | 'value'>; /** * @param props * @constructor * @example * // 没有 slot * console.log('click')}> * * // 只传递了 slot left * slotLeft={12312} value='微信支付' rightColor='#333' background='#fff' padding='' borderRadius={30} valueOnClick={() => console.log('click')}> * * // 只传递了 slot right * label='只传递了 slot right' leftColor='#666' slotRight={slot right value} background='#fff' padding='' borderRadius={30}> * * // 传递了slotLeft & slotRight * slotLeft={12312} slotRight={slot right value} background='#fff' padding='' borderRadius={30}> */ export declare function LxItem

(props: P): JSX.Element; export declare namespace LxItem { var defaultProps: { background: string; borderRadius: number; }; } export {};