Get the component instance. Args: children: The children of the component. props: The props of the component. Raises: NotImplementedError: if the subclass does not override this method.
(cls, *children, **props)
| 2553 | |
| 2554 | @classmethod |
| 2555 | def get_component(cls, *children, **props) -> Component: |
| 2556 | """Get the component instance. |
| 2557 | |
| 2558 | Args: |
| 2559 | children: The children of the component. |
| 2560 | props: The props of the component. |
| 2561 | |
| 2562 | Raises: |
| 2563 | NotImplementedError: if the subclass does not override this method. |
| 2564 | """ |
| 2565 | msg = f"{cls.__name__} must implement get_component to return the component instance." |
| 2566 | raise NotImplementedError(msg) |
| 2567 | |
| 2568 | @classmethod |
| 2569 | def create(cls, *children, **props) -> Component: |