mirror of
https://github.com/leon-ai/leon.git
synced 2024-09-11 18:27:21 +03:00
Merge branch 'widget-backbone' into mistral-llm-ner
This commit is contained in:
commit
7482edde0a
@ -15,7 +15,7 @@ def run(params: ActionParams) -> None:
|
||||
|
||||
# TODO: handle voice text when widget
|
||||
number_widget_options: WidgetOptions[NumberWidgetParams] = WidgetOptions(
|
||||
wrapper_props={'noPadding': True},
|
||||
wrapper_props={'noPadding': False},
|
||||
params={'random_number': random_number}
|
||||
)
|
||||
number_widget = NumberWidget(number_widget_options)
|
||||
|
@ -1,5 +1,7 @@
|
||||
from typing import TypedDict
|
||||
from bridges.python.src.sdk.aurora.button import Button
|
||||
from bridges.python.src.sdk.aurora.text import Text
|
||||
from bridges.python.src.sdk.aurora.flexbox import Flexbox
|
||||
|
||||
from bridges.python.src.sdk.widget import Widget, WidgetOptions
|
||||
from bridges.python.src.sdk.widget_component import WidgetComponent
|
||||
@ -13,6 +15,13 @@ class NumberWidget(Widget[NumberWidgetParams]):
|
||||
super().__init__(options)
|
||||
|
||||
def render(self) -> WidgetComponent:
|
||||
return Button({
|
||||
'children': self.params.get('random_number')
|
||||
return Flexbox({
|
||||
'alignItems': 'center',
|
||||
'justifyContent': 'center',
|
||||
'children': [
|
||||
Text({
|
||||
'children': self.params.get('random_number'),
|
||||
'fontSize': 'xl'
|
||||
})
|
||||
]
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user