import type { LayoutProps, PointerProps } from "@solidrt/core" import type { StyleProps } from "./types" export interface ViewProps extends PointerProps { children?: any ref?: (node: { id: number }) => void layout?: LayoutProps style?: StyleProps } export function View(props: ViewProps) { let hasBackground = () => props.style?.backgroundColor != null || props.style?.borderRadius != null let hasBorder = () => (props.style?.borderWidth ?? 0) > 0 return ( {hasBackground() ? ( ) : null} {props.children} {hasBorder() ? ( ) : null} ) }