Open crearis opened 3 months ago
Here is an example usage of the allowsProse
prop (before your changes):
const spec: ComponentSpec = {} as any
spec.allowsProse // error
if (spec.isParent) {
spec.allowsProse // no error
}
I would not say that a component needs to be a 'parent' or 'nestable' because it wants to accept prose on the default slot > so that Alert and Heading are not Parents but can process prose > what are your thoughts on that?
A component that has a <slot />
is a parent/nestable component, and other components are singletons. Technically, a Prose
component can only be placed inside a component with a <slot />
.
The component-spec is a great place to set the basic definitions of the components
But I am still having troubles with it ... I keep getting typing- errors based on the split in Singletons and Parents. I think we have things to discuss and clarify here.
allowsProse: boolean
to singleton which takes away the difference here.