rename Grid to grid to align to other elements

This commit is contained in:
Fabio Pliger
2024-02-02 12:58:33 -06:00
parent cf987b1ce9
commit 3bf4a850d6
5 changed files with 58 additions and 35 deletions

View File

@@ -308,10 +308,12 @@ _add_js_properties(
"width",
)
# NOTE: Input is a reserved keyword in Python, so we use input_ instead
class input_(ElementBase):
tag = "input"
# https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attributes
_add_js_properties(
input_,
@@ -352,11 +354,11 @@ _add_js_properties(
# Custom Elements
class Grid(ElementBase):
class grid(TextElementBase):
tag = "div"
def __init__(self, layout="", gap=None, **kwargs):
super().__init__(**kwargs)
def __init__(self, layout, content=None, gap=None, **kwargs):
super().__init__(content, **kwargs)
self.style["display"] = "grid"
self.style["grid-template-columns"] = layout