Skip to content

Commit

Permalink
Add title to dialog examples (#1069)
Browse files Browse the repository at this point in the history
* Add title to dialog examples

* Remove accidental copy-paste
  • Loading branch information
sfc-gh-dmatthews committed May 18, 2024
1 parent 32a4354 commit 0dbe001
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions content/develop/api-reference/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,7 @@ c.write("This will show second")
Insert a modal dialog that can rerun independently from the rest of the script.

```python
@st.experimental_dialog()
@st.experimental_dialog("Sign up")
def email_form():
name = st.text_input("Name")
email = st.text_input("Email")
Expand Down Expand Up @@ -1875,7 +1875,7 @@ st.page_link("pages/profile.py", label="My profile")
Insert a modal dialog that can rerun independently from the rest of the script.

```python
@st.experimental_dialog()
@st.experimental_dialog("Sign up")
def email_form():
name = st.text_input("Name")
email = st.text_input("Email")
Expand Down
2 changes: 1 addition & 1 deletion content/develop/api-reference/control-flow/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ By default, Streamlit apps execute the script entirely, but we allow some functi
Insert a modal dialog that can rerun independently from the rest of the script.

```python
@st.experimental_dialog()
@st.experimental_dialog("Sign up")
def email_form():
name = st.text_input("Name")
email = st.text_input("Email")
Expand Down
2 changes: 1 addition & 1 deletion content/develop/quick-references/api-cheat-sheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ st.switch_page("pages/my_page.py")
>>> st.form_submit_button("Login")

# Define a dialog function
>>> @st.experimental_dialog
>>> @st.experimental_dialog("Welcome!")
>>> def modal_dialog():
>>> st.write("Hello")
>>>
Expand Down

0 comments on commit 0dbe001

Please sign in to comment.