html_compose.attributes.optgroup_attrs
1from . import BaseAttribute 2from ..base_types import StrLike 3 4 5class OptgroupAttrs: 6 """ 7 This module contains functions for attributes in the 'optgroup' 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 "optgroup" 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 "optgroup" 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)
class
OptgroupAttrs:
6class OptgroupAttrs: 7 """ 8 This module contains functions for attributes in the 'optgroup' 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 "optgroup" 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 "optgroup" 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)
This module contains functions for attributes in the 'optgroup' element. Which is inherited by a class so we can generate type hints
12 @staticmethod 13 def disabled(value: bool) -> BaseAttribute: 14 """ 15 "optgroup" 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)
"optgroup" 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 "optgroup" 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)
"optgroup" attribute: label User-visible label
Args: value: Text
Returns: An label attribute to be added to your element