Skip to content

Commit

Permalink
Add more default properties
Browse files Browse the repository at this point in the history
  • Loading branch information
MaddyGuthridge committed Sep 29, 2023
1 parent 98aafc7 commit 34b191a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
12 changes: 12 additions & 0 deletions meta/tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ script:
doc: Type of script to use
default: text/javascript

style:
properties:
type:
doc: Type of style to use
default: text/css

form:
properties:
method:
doc: HTTP request method to use
default: POST

p:
base: StylableTag

Expand Down
16 changes: 8 additions & 8 deletions pyhtml/__tags/generated.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class style(Tag):
def __init__(
self,
*children: Any,

type: Any = 'text/css',
**properties: Any,
) -> None:
"""
Expand All @@ -233,14 +233,14 @@ def __init__(
[View full documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style)
"""
properties |= {

'type': type,
}
super().__init__(*children, **properties)

def __call__(
self,
*children: Any,

type: Any = 'text/css',
**properties: Any,
):
"""
Expand All @@ -249,7 +249,7 @@ def __call__(
[View full documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style)
"""
properties |= {

'type': type,
}
return super().__call__(*children, **properties)

Expand Down Expand Up @@ -3964,7 +3964,7 @@ class form(Tag):
def __init__(
self,
*children: Any,

method: Any = 'POST',
**properties: Any,
) -> None:
"""
Expand All @@ -3973,14 +3973,14 @@ def __init__(
[View full documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form)
"""
properties |= {

'method': method,
}
super().__init__(*children, **properties)

def __call__(
self,
*children: Any,

method: Any = 'POST',
**properties: Any,
):
"""
Expand All @@ -3989,7 +3989,7 @@ def __call__(
[View full documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form)
"""
properties |= {

'method': method,
}
return super().__call__(*children, **properties)

Expand Down

0 comments on commit 34b191a

Please sign in to comment.