Open thomasborgen opened 1 month ago
HButton(
variant: Literal["primary", "secondary"] = "primary"
disabled: bool = False
size: Literal["big", "medium", "small"] = "medium"
fluid: bool = True # causes button to fill available space
) -> Element
If we add components, we might need to add css with some simple classes and variables to override.
Counter()
Should render as 3 elements, a plus and minus button and a input element in the middle with type number and optional min/max
values set.
I think I'm going to add some components for layouts.
For example a
Stack
class that renders aDiv
withdisplay: flex
and other convenient attributes likedirection: Literal["horizontal", "vertical"] = "horizontal"
to handle flex direction.align_items
etc. maybefluid: bool = True
for a full width/auto switch as well.We can do this, and it is typed and autocompleted in the
styles
attribute. But theres something nice about having a named component that just speaks to me.