import { component, type Define } from '@sigx/lynx'; export type ScrollViewProps = & Define.Prop<'direction', 'vertical' | 'horizontal', false> & Define.Prop<'height', number | string, false> & Define.Prop<'width', number | string, false> & Define.Prop<'flex', number, false> & Define.Prop<'showScrollbar', boolean, false> & Define.Prop<'bounces', boolean, false> & Define.Prop<'class', string, false> & Define.Slot<'default'>; export const ScrollView = component(({ props, slots }) => { const getStyle = (): Record => { const style: Record = {}; if (props.height !== undefined) style.height = props.height; if (props.width !== undefined) style.width = props.width; if (props.flex !== undefined) style.flex = props.flex; return style; }; return () => { const dir = props.direction ?? 'vertical'; return ( {slots.default?.()} ); }; });