File tree Expand file tree Collapse file tree 3 files changed +24
-4
lines changed
Expand file tree Collapse file tree 3 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 66
77@dataclass (frozen = True )
88class Container (Component , ABC ):
9+ """Base class for components that require child components to be useful."""
10+
911 children : list [Component ] = field (default_factory = list )
12+ """The child components."""
1013
1114 def add (self , component : Component ):
15+ """Add a component.
16+
17+ Args:
18+ component: the child component.
19+ """
1220 self .children .append (component )
Original file line number Diff line number Diff line change 1- Given here is a list of the components supported by chartlets .
1+ Given here is a list of the components supported by Chartlets .
22
3- Using the Python package, they can be imported from the ` chartlets.components `
4- module, e.g.
3+ Using the Python package ` chartlets ` , the related component classes can be
4+ imported from the ` chartlets.components ` module, e.g.
55
66``` python
77from chartlets.components import Checkbox
88```
99
10+ ## Classes
11+
1012::: chartlets.components.Box
1113
1214::: chartlets.components.Button
@@ -17,6 +19,8 @@ from chartlets.components import Checkbox
1719
1820::: chartlets.components.Typography
1921
22+ ## Base classes
2023
2124::: chartlets.Component
2225
26+ ::: chartlets.Container
Original file line number Diff line number Diff line change @@ -10,7 +10,13 @@ plugins:
1010 show_source : false
1111 show_if_no_docstring : false
1212 show_root_heading : true
13- heading_level : 2
13+ heading_level : 3
14+ toc : true
15+ toc_depth : 1
16+ members :
17+ - methods
18+ - classes
19+ - attributes
1420
1521nav :
1622 - Home : index.md
2127
2228theme :
2329 name : material
30+ features :
31+ - toc.integrate # Ensures TOC is integrated into the sidebar
2432 locale : en
2533 # include_sidebar: false
2634 palette :
You can’t perform that action at this time.
0 commit comments