diff --git a/docs/source-app/workflows/add_web_ui/html/basic.rst b/docs/source-app/workflows/add_web_ui/html/basic.rst index 83b6fb7d13..114323ced6 100644 --- a/docs/source-app/workflows/add_web_ui/html/basic.rst +++ b/docs/source-app/workflows/add_web_ui/html/basic.rst @@ -56,7 +56,7 @@ First **create a file named app.py** with the app content (in the same folder as class HelloComponent(L.LightningFlow): def configure_layout(self): - return L.frontend.web.StaticWebFrontend(serve_dir='.') + return L.app.frontend.web.StaticWebFrontend(serve_dir='.') class LitApp(L.LightningFlow): def __init__(self): @@ -107,7 +107,7 @@ Give the component an HTML UI, by returning a ``StaticWebFrontend`` object from class HelloComponent(L.LightningFlow): def configure_layout(self): - return L.frontend.web.StaticWebFrontend(serve_dir='.') + return L.app.frontend.web.StaticWebFrontend(serve_dir='.') class LitApp(L.LightningFlow): def __init__(self): @@ -137,7 +137,7 @@ In this case, we render the ``HelloComponent`` UI in the ``home`` tab of the app class HelloComponent(L.LightningFlow): def configure_layout(self): - return L.frontend.web.StaticWebFrontend(serve_dir='.') + return L.app.frontend.web.StaticWebFrontend(serve_dir='.') class LitApp(L.LightningFlow): def __init__(self): diff --git a/docs/source-app/workflows/add_web_ui/react/connect_react_and_lightning.rst b/docs/source-app/workflows/add_web_ui/react/connect_react_and_lightning.rst index c1c0c5e201..74b252c121 100644 --- a/docs/source-app/workflows/add_web_ui/react/connect_react_and_lightning.rst +++ b/docs/source-app/workflows/add_web_ui/react/connect_react_and_lightning.rst @@ -82,12 +82,12 @@ You can use this single react app for the FULL Lightning app, or you can specify class ComponentA(L.LightningFlow): def configure_layout(self): - return L.frontend.StaticWebFrontend(Path(__file__).parent / "react_app_1/dist") + return L.app.frontend.StaticWebFrontend(Path(__file__).parent / "react_app_1/dist") class ComponentB(L.LightningFlow): def configure_layout(self): - return L.frontend.StaticWebFrontend(Path(__file__).parent / "react_app_2/dist") + return L.app.frontend.StaticWebFrontend(Path(__file__).parent / "react_app_2/dist") class HelloLitReact(L.LightningFlow): diff --git a/docs/source-app/workflows/add_web_ui/streamlit/basic.rst b/docs/source-app/workflows/add_web_ui/streamlit/basic.rst index 464b558032..6bad07f552 100644 --- a/docs/source-app/workflows/add_web_ui/streamlit/basic.rst +++ b/docs/source-app/workflows/add_web_ui/streamlit/basic.rst @@ -46,7 +46,7 @@ First **create a file named app.py** with the app content: class LitStreamlit(L.LightningFlow): def configure_layout(self): - return L.frontend.StreamlitFrontend(render_fn=your_streamlit_app) + return L.app.frontend.StreamlitFrontend(render_fn=your_streamlit_app) class LitApp(L.LightningFlow): def __init__(self): @@ -125,7 +125,7 @@ the ``configure_layout`` method of the Lightning component you want to connect t class LitStreamlit(L.LightningFlow): def configure_layout(self): - return L.frontend.StreamlitFrontend(render_fn=your_streamlit_app) + return L.app.frontend.StreamlitFrontend(render_fn=your_streamlit_app) class LitApp(L.LightningFlow): def __init__(self): @@ -160,7 +160,7 @@ In this case, we render the ``LitStreamlit`` UI in the ``home`` tab of the appli class LitStreamlit(L.LightningFlow): def configure_layout(self): - return L.frontend.StreamlitFrontend(render_fn=your_streamlit_app) + return L.app.frontend.StreamlitFrontend(render_fn=your_streamlit_app) class LitApp(L.LightningFlow): def __init__(self): diff --git a/docs/source-app/workflows/add_web_ui/streamlit/intermediate.rst b/docs/source-app/workflows/add_web_ui/streamlit/intermediate.rst index ac289c2eb2..2b828819d4 100644 --- a/docs/source-app/workflows/add_web_ui/streamlit/intermediate.rst +++ b/docs/source-app/workflows/add_web_ui/streamlit/intermediate.rst @@ -35,7 +35,7 @@ For example, here we increase the count variable of the Lightning Component ever self.count = 0 def configure_layout(self): - return L.frontend.StreamlitFrontend(render_fn=your_streamlit_app) + return L.app.frontend.StreamlitFrontend(render_fn=your_streamlit_app) class LitApp(L.LightningFlow): @@ -81,7 +81,7 @@ In this example we update the value of the counter from the component: self.count += 1 def configure_layout(self): - return L.frontend.StreamlitFrontend(render_fn=your_streamlit_app) + return L.app.frontend.StreamlitFrontend(render_fn=your_streamlit_app) class LitApp(L.LightningFlow): diff --git a/docs/source-app/workflows/build_lightning_component/intermediate.rst b/docs/source-app/workflows/build_lightning_component/intermediate.rst index 2533cbac35..01586c048b 100644 --- a/docs/source-app/workflows/build_lightning_component/intermediate.rst +++ b/docs/source-app/workflows/build_lightning_component/intermediate.rst @@ -32,12 +32,11 @@ To *connect* this user interface to the Component, define the configure_layout m :emphasize-lines: 5, 6 import lightning as L - from lightning_app.frontend.web import StaticWebFrontend class LitHTMLComponent(L.LightningFlow): def configure_layout(self): - return StaticWebFrontend(serve_dir="path/to/folder/with/index.html/inside") + return L.app.frontend.StaticWebFrontend(serve_dir="path/to/folder/with/index.html/inside") Finally, route the Component's UI through the root Component's **configure_layout** method: @@ -50,7 +49,7 @@ Finally, route the Component's UI through the root Component's **configure_layou class LitHTMLComponent(L.LightningFlow): def configure_layout(self): - return L.frontend.web.StaticWebFrontend(serve_dir="path/to/folder/with/index.html/inside") + return L.app.frontend.web.StaticWebFrontend(serve_dir="path/to/folder/with/index.html/inside") class LitApp(L.LightningFlow):