dara-components 1.20.3__py3-none-any.whl → 1.21.1__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.
@@ -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),