Closed thomasborgen closed 4 months ago
It should be convenient to be able to have a value and if it is none the attribute is ommited like:
def input_element( label: str, name: str, value: str, placeholder: str | None = None, ) -> Element: """Create an input element with a label.""" return Div( Label(text=label), Input( name=name, value=value, placeholder=placeholder, ), classes=["input_container"], )
Then things like this would work where placeholder would just be ommited if they aren't provided.
placeholder
It should be convenient to be able to have a value and if it is none the attribute is ommited like:
Then things like this would work where
placeholder
would just be ommited if they aren't provided.