Add React fragment support (#148)
This commit is contained in:
parent
76e6a690ce
commit
84ca907aac
@ -6,6 +6,7 @@ from .cond import Cond
|
||||
from .container import Container
|
||||
from .flex import Flex
|
||||
from .foreach import Foreach
|
||||
from .fragment import Fragment
|
||||
from .grid import Grid, GridItem, ResponsiveGrid
|
||||
from .html import Html
|
||||
from .spacer import Spacer
|
||||
|
9
pynecone/components/layout/fragment.py
Normal file
9
pynecone/components/layout/fragment.py
Normal file
@ -0,0 +1,9 @@
|
||||
"""React fragments to enable bare returns of component trees from functions."""
|
||||
from pynecone.components.component import Component
|
||||
|
||||
|
||||
class Fragment(Component):
|
||||
"""A React fragment to return multiple components from a function without wrapping it in a container."""
|
||||
|
||||
library = "react"
|
||||
tag = "Fragment"
|
Loading…
Reference in New Issue
Block a user