
* delete most references to varr * [REF-3562][REF-3563] Replace chakra usage (#3872) * only one mention of var * delete vars.py why not * remove reflex.vars * rename immutable var to var * rename ivars to vars * add vars back smh * ruff * no more create_safe * reorder deprecated * remove raises * remove all Var.create * move to new api * fix unit tests * fix pyi hopefully * sort literals * fix event handler issues * update poetry * fix silly issues i'm very silly * add var_operation_return * rename immutable to not immutable * add str type * it's ruff out there --------- Co-authored-by: Elijah Ahianyo <elijahahianyo@gmail.com>
34 lines
735 B
Python
34 lines
735 B
Python
"""Wrapping of the next-video component."""
|
|
|
|
from typing import Optional
|
|
|
|
from reflex.components.component import Component
|
|
from reflex.vars.base import Var
|
|
|
|
from .base import NextComponent
|
|
|
|
|
|
class Video(NextComponent):
|
|
"""A video component from NextJS."""
|
|
|
|
tag = "Video"
|
|
library = "next-video"
|
|
is_default = True
|
|
# the URL
|
|
src: Var[str]
|
|
|
|
as_: Optional[Component]
|
|
|
|
@classmethod
|
|
def create(cls, *children, **props) -> NextComponent:
|
|
"""Create a Video component.
|
|
|
|
Args:
|
|
*children: The children of the component.
|
|
**props: The props of the component.
|
|
|
|
Returns:
|
|
The Video component.
|
|
"""
|
|
return super().create(*children, **props)
|