sweetpotato.core.interfaces.BaseComponent#

class sweetpotato.core.interfaces.BaseComponent(*args, **kwargs)[source]#

Bases: Protocol

Base React Native component protocol.

__init__(*args, **kwargs)#

Methods

__init__(*args, **kwargs)

render()

Renders a .js formatted string of the component.

Attributes

attrs

Property string of given attributes for component

children

Property returning inner content.

is_composite

Indicates whether component may have inner content.

variables

Property returning string of variables (if any) belonging to given component.

package

Default package for component.

allowed_attributes

Set of allowed props for component, default 'state', 'props', 'style'.

base_attributes

Set of allowed props for component, default 'state', 'props', 'style'.

import_name

allowed_attributes: set[str]#

Set of allowed props for component, default ‘state’, ‘props’, ‘style’.

abstract property attrs: str#

Property string of given attributes for component

base_attributes: set[str]#

Set of allowed props for component, default ‘state’, ‘props’, ‘style’.

abstract property children: str#

Property returning inner content.

is_composite: bool = False#

Indicates whether component may have inner content.

package: str#

Default package for component.

abstract render()[source]#

Renders a .js formatted string of the component.

Return type:

str

abstract property variables: str#

Property returning string of variables (if any) belonging to given component.