File tree Expand file tree Collapse file tree 5 files changed +29
-0
lines changed
chartlets.py/chartlets/components Expand file tree Collapse file tree 5 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 55
66@dataclass (frozen = True )
77class Button (Component ):
8+ """Buttons allow users to take actions, and make choices,
9+ with a single tap."""
10+
811 text : str | None = None
12+ """The button text."""
Original file line number Diff line number Diff line change 55
66@dataclass (frozen = True )
77class Checkbox (Component ):
8+ """Checkboxes allow the user to select one or more items from a set.
9+ They can be used to turn an option on or off."""
10+
811 value : bool | None = None
12+ """The checkbox value."""
13+
914 label : str = ""
15+ """The checkbox label."""
Original file line number Diff line number Diff line change 55
66@dataclass (frozen = True )
77class Dropdown (Component ):
8+ """Dropdown components are used for collecting user provided
9+ information from a list of options."""
10+
811 options : list [tuple [str , str | int | float ]] = field (default_factory = list )
12+ """The options given as a list of (label, value) pairs."""
Original file line number Diff line number Diff line change 88
99@dataclass (frozen = True )
1010class Plot (Component ):
11+ """The plot component is a container for a
12+ [Vega Altair](https://altair-viz.github.io/) chart."""
13+
1114 chart : alt .Chart | None = None
15+ """The Vega Altair
16+ [chart object](https://altair-viz.github.io/user_guide/generated/toplevel/altair.Chart.html)."""
1217
1318 def to_dict (self ) -> dict [str , Any ]:
1419 d = super ().to_dict ()
Original file line number Diff line number Diff line change 55
66@dataclass (frozen = True )
77class Typography (Component ):
8+ """Use typography to present your design and content as clearly
9+ and efficiently as possible."""
10+
811 text : str | None = None
12+ """Optional text to be displayed."""
13+
14+ color : str | None = None
15+ """The color of the component."""
16+
17+ variant : str | None = None
18+ """Applies the theme typography styles."""
You can’t perform that action at this time.
0 commit comments