Factory for composable (leaf) components.
The implementation receives full HTMLAttributes<E> so it can destructure role, style, etc.
Consumers see only ComposableProps<P> — a narrow type exposing classNames, className,
children, and the custom props P.
For generic components, use any for the type parameter inside composable and
cast the result to restore the generic signature for consumers.
Factory for composable (leaf) components. The implementation receives full
HTMLAttributes<E>so it can destructurerole,style, etc. Consumers see onlyComposableProps<P>— a narrow type exposingclassNames,className,children, and the custom propsP.For generic components, use
anyfor the type parameter insidecomposableand cast the result to restore the generic signature for consumers.