html_compose.attributes.option_attrs

 1from . import BaseAttribute
 2from ..base_types import StrLike
 3
 4
 5class OptionAttrs:
 6    """
 7    This module contains functions for attributes in the 'option' element.
 8    Which is inherited by a class so we can generate type hints
 9    """
10
11    @staticmethod
12    def disabled(value: bool) -> BaseAttribute:
13        """
14        "option" attribute: disabled
15        Whether the form control is disabled
16
17        Args:
18            value:
19                Boolean attribute
20
21        Returns:
22            An disabled attribute to be added to your element
23
24        """
25
26        return BaseAttribute("disabled", value)
27
28    @staticmethod
29    def label(value: StrLike) -> BaseAttribute:
30        """
31        "option" attribute: label
32        User-visible label
33
34        Args:
35            value:
36                Text
37
38        Returns:
39            An label attribute to be added to your element
40
41        """
42
43        return BaseAttribute("label", value)
44
45    @staticmethod
46    def selected(value: bool) -> BaseAttribute:
47        """
48        "option" attribute: selected
49        Whether the option is selected by default
50
51        Args:
52            value:
53                Boolean attribute
54
55        Returns:
56            An selected attribute to be added to your element
57
58        """
59
60        return BaseAttribute("selected", value)
61
62    @staticmethod
63    def value(value: StrLike) -> BaseAttribute:
64        """
65        "option" attribute: value
66        Value to be used for form submission
67
68        Args:
69            value:
70                Text
71
72        Returns:
73            An value attribute to be added to your element
74
75        """
76
77        return BaseAttribute("value", value)
class OptionAttrs:
 6class OptionAttrs:
 7    """
 8    This module contains functions for attributes in the 'option' element.
 9    Which is inherited by a class so we can generate type hints
10    """
11
12    @staticmethod
13    def disabled(value: bool) -> BaseAttribute:
14        """
15        "option" attribute: disabled
16        Whether the form control is disabled
17
18        Args:
19            value:
20                Boolean attribute
21
22        Returns:
23            An disabled attribute to be added to your element
24
25        """
26
27        return BaseAttribute("disabled", value)
28
29    @staticmethod
30    def label(value: StrLike) -> BaseAttribute:
31        """
32        "option" attribute: label
33        User-visible label
34
35        Args:
36            value:
37                Text
38
39        Returns:
40            An label attribute to be added to your element
41
42        """
43
44        return BaseAttribute("label", value)
45
46    @staticmethod
47    def selected(value: bool) -> BaseAttribute:
48        """
49        "option" attribute: selected
50        Whether the option is selected by default
51
52        Args:
53            value:
54                Boolean attribute
55
56        Returns:
57            An selected attribute to be added to your element
58
59        """
60
61        return BaseAttribute("selected", value)
62
63    @staticmethod
64    def value(value: StrLike) -> BaseAttribute:
65        """
66        "option" attribute: value
67        Value to be used for form submission
68
69        Args:
70            value:
71                Text
72
73        Returns:
74            An value attribute to be added to your element
75
76        """
77
78        return BaseAttribute("value", value)

This module contains functions for attributes in the 'option' element. Which is inherited by a class so we can generate type hints

@staticmethod
def disabled(value: bool) -> html_compose.base_attribute.BaseAttribute:
12    @staticmethod
13    def disabled(value: bool) -> BaseAttribute:
14        """
15        "option" attribute: disabled
16        Whether the form control is disabled
17
18        Args:
19            value:
20                Boolean attribute
21
22        Returns:
23            An disabled attribute to be added to your element
24
25        """
26
27        return BaseAttribute("disabled", value)

"option" attribute: disabled Whether the form control is disabled

Args: value: Boolean attribute

Returns: An disabled attribute to be added to your element

@staticmethod
def label( value: str | float | int | bool) -> html_compose.base_attribute.BaseAttribute:
29    @staticmethod
30    def label(value: StrLike) -> BaseAttribute:
31        """
32        "option" attribute: label
33        User-visible label
34
35        Args:
36            value:
37                Text
38
39        Returns:
40            An label attribute to be added to your element
41
42        """
43
44        return BaseAttribute("label", value)

"option" attribute: label User-visible label

Args: value: Text

Returns: An label attribute to be added to your element

@staticmethod
def selected(value: bool) -> html_compose.base_attribute.BaseAttribute:
46    @staticmethod
47    def selected(value: bool) -> BaseAttribute:
48        """
49        "option" attribute: selected
50        Whether the option is selected by default
51
52        Args:
53            value:
54                Boolean attribute
55
56        Returns:
57            An selected attribute to be added to your element
58
59        """
60
61        return BaseAttribute("selected", value)

"option" attribute: selected Whether the option is selected by default

Args: value: Boolean attribute

Returns: An selected attribute to be added to your element

@staticmethod
def value( value: str | float | int | bool) -> html_compose.base_attribute.BaseAttribute:
63    @staticmethod
64    def value(value: StrLike) -> BaseAttribute:
65        """
66        "option" attribute: value
67        Value to be used for form submission
68
69        Args:
70            value:
71                Text
72
73        Returns:
74            An value attribute to be added to your element
75
76        """
77
78        return BaseAttribute("value", value)

"option" attribute: value Value to be used for form submission

Args: value: Text

Returns: An value attribute to be added to your element