Skip to content

Commit

Permalink
Add comments to html metadata component (#3731)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alek99 committed Aug 1, 2024
1 parent ad14f38 commit 76627c2
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
27 changes: 26 additions & 1 deletion reflex/components/el/elements/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,49 @@ class Link(BaseHTML): # noqa: E742

tag = "link"

# Specifies the CORS settings for the linked resource
cross_origin: Var[Union[str, int, bool]]

# Specifies the URL of the linked document/resource
href: Var[Union[str, int, bool]]

# Specifies the language of the text in the linked document
href_lang: Var[Union[str, int, bool]]

# Allows a browser to check the fetched link for integrity
integrity: Var[Union[str, int, bool]]

# Specifies on what device the linked document will be displayed
media: Var[Union[str, int, bool]]

# Specifies the referrer policy of the linked document
referrer_policy: Var[Union[str, int, bool]]

# Specifies the relationship between the current document and the linked one
rel: Var[Union[str, int, bool]]

# Specifies the sizes of icons for visual media
sizes: Var[Union[str, int, bool]]

# Specifies the MIME type of the linked document
type: Var[Union[str, int, bool]]


class Meta(BaseHTML): # Inherits common attributes from BaseHTML
"""Display the meta element."""

tag = "meta"
tag = "meta" # The HTML tag for this element is <meta>

# Specifies the character encoding for the HTML document
char_set: Var[Union[str, int, bool]]

# Defines the content of the metadata
content: Var[Union[str, int, bool]]

# Provides an HTTP header for the information/value of the content attribute
http_equiv: Var[Union[str, int, bool]]

# Specifies a name for the metadata
name: Var[Union[str, int, bool]]


Expand Down
13 changes: 13 additions & 0 deletions reflex/components/el/elements/metadata.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,15 @@ class Link(BaseHTML):
Args:
*children: The children of the component.
cross_origin: Specifies the CORS settings for the linked resource
href: Specifies the URL of the linked document/resource
href_lang: Specifies the language of the text in the linked document
integrity: Allows a browser to check the fetched link for integrity
media: Specifies on what device the linked document will be displayed
referrer_policy: Specifies the referrer policy of the linked document
rel: Specifies the relationship between the current document and the linked one
sizes: Specifies the sizes of icons for visual media
type: Specifies the MIME type of the linked document
access_key: Provides a hint for generating a keyboard shortcut for the current element.
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
content_editable: Indicates whether the element's content is editable.
Expand Down Expand Up @@ -466,6 +475,10 @@ class Meta(BaseHTML):
Args:
*children: The children of the component.
char_set: Specifies the character encoding for the HTML document
content: Defines the content of the metadata
http_equiv: Provides an HTTP header for the information/value of the content attribute
name: Specifies a name for the metadata
access_key: Provides a hint for generating a keyboard shortcut for the current element.
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
content_editable: Indicates whether the element's content is editable.
Expand Down

0 comments on commit 76627c2

Please sign in to comment.