dara-components 1.20.2__py3-none-any.whl → 1.21.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -233,7 +233,7 @@ class Accordion(LayoutComponent):
233
233
 
234
234
 
235
235
  config = ConfigurationBuilder()
236
- config.add_page(name='Accordion Page', content=accordion(), icon=get_icon('chart-line'))
236
+ config.router.add_page(path='accordion', content=accordion)
237
237
  ```
238
238
 
239
239
  For more examples check the AccordionItem documentation.
@@ -116,6 +116,7 @@ class Button(LayoutComponent):
116
116
  :param outline: This allows to pick between two styles, if False the button is filled with a solid background color,
117
117
  if True it shows a transparent background with an outlined colored border. Filled buttons are more prominent and
118
118
  often used as primary actions, while outline buttons are more subtle and commonly used as secondary actions.
119
+ :param stop_click_propagation: Whether to stop the click event from propagating to the parent element, defaults to true
119
120
  """
120
121
 
121
122
  disabled: Optional[Union[Condition, ClientVariable, bool]] = None
@@ -123,6 +124,7 @@ class Button(LayoutComponent):
123
124
  icon: Optional[str] = None
124
125
  styling: Optional[ButtonStyle] = None
125
126
  outline: bool = False
127
+ stop_click_propagation: bool = True
126
128
 
127
129
  def __init__(
128
130
  self, children: Union[str, ComponentInstance, ClientVariable], styling: Optional[ButtonStyle] = None, **kwargs
@@ -101,12 +101,8 @@ class Plotly(StyledComponentInstance):
101
101
  fig = px.scatter(df, x='sepal_width', y='sepal_length', color='species', title='Iris Dataset Scatter Plot')
102
102
 
103
103
 
104
- def plotly_page():
105
- return Plotly(figure=fig, min_height=100)
106
-
107
-
108
104
  config = ConfigurationBuilder()
109
- config.add_page(name='MyPlot', content=plotly_page())
105
+ config.router.add_page(path='my-plot', content=Plotly(figure=fig, min_height=100))
110
106
  ```
111
107
 
112
108
  :param figure: A plotly figure
@@ -50,8 +50,8 @@ class Chat(StyledComponentInstance):
50
50
  config.add_auth(MultiBasicAuthConfig(users={'user': 'password', 'user2': 'password2'}))
51
51
 
52
52
  # Add a page with a chat component, this can be added anywhere within a page
53
- config.add_page(
54
- name='Chat Page',
53
+ config.router.add_page(
54
+ path='chat',
55
55
  content=Stack(
56
56
  Text('This is a page with a chat'),
57
57
  Chat(value=collab_variable),