ProtocolComponent
TypeSource
ProtocolComponent(*args: Any, **kwargs: Any)
A protocol providing components. This protocol will be implemented in renderer.components.
Arguments
Initialization function is not specified.
Protocol methods
icon_obj
v_1: str = self.icon_obj(
type: Literal[
"method", "op", "param", "package", "module", "class", "func", "type"
],
text: str = "",
)
The protocol of the subtitle icon.
Requires
| Name | Type | Required | |
|---|---|---|---|
type | Literal["method", "op", "param", "package", "module", "class", "func", "type"] | The name determining the icon. | |
text | str | An optional text after the icon. If it is empty, will only display the icon. |
Returns
| Name | Type | |
|---|---|---|
v_1 | str | The MDX code of the icon-text. |
inline_icon
v_1: str = self.inline_icon(icon: Literal["check"])
The protocol of special single icon.
Requires
| Name | Type | Required | |
|---|---|---|---|
icon | Literal["check"] | The name determining the icon. |
Returns
| Name | Type | |
|---|---|---|
v_1 | str | The MDX code of the icon. |
Protocol properties
apibar
apibar: type[ComponentAPIBar] = self.apibar
The protocol of the top API bar. The returned value is a PyDantic model class.