Skip to content

Commit ebfae49

Browse files
Sync cookie cutter templates
1 parent 9a4d682 commit ebfae49

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

template-reactless/e2e/test_template.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def go_to_app(page: Page, streamlit_app: StreamlitRunner):
2222
page.get_by_role("img", name="Running...").is_hidden()
2323

2424

25-
def test_should_render_user_input(page: Page):
25+
def test_should_render_template(page: Page):
2626
frame = page.frame_locator(
2727
'iframe[title="my_component\\.my_component"] >> nth=0'
2828
)
@@ -31,4 +31,4 @@ def test_should_render_user_input(page: Page):
3131

3232
frame.get_by_role("button", name="Click me!").click()
3333

34-
page.get_by_text("You've clicked 1 times!")
34+
page.get_by_text("You've clicked 1 times!")

template-reactless/my_component/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,3 @@ def my_component(name, key=None):
7575
# We could modify the value returned from the component if we wanted.
7676
# There's no need to do this in our simple example - but it's an option.
7777
return component_value
78-
79-
80-

template-reactless/my_component/example.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
import streamlit as st
2+
from my_component import my_component
3+
14
# Add some test code to play with the component while it's in development.
25
# During development, we can run this just as we would any other Streamlit
36
# app: `$ streamlit run my_component/example.py`
47

5-
import streamlit as st
6-
from my_component import my_component
7-
88
st.subheader("Component with constant args")
99

1010
# Create an instance of our component with a constant `name` arg, and
@@ -25,4 +25,4 @@
2525
# "name" argument without having it get recreated.
2626
name_input = st.text_input("Enter a name", value="Streamlit")
2727
num_clicks = my_component(name_input, key="foo")
28-
st.markdown("You've clicked %s times!" % int(num_clicks))
28+
st.markdown("You've clicked %s times!" % int(num_clicks))

template/my_component/example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@
2525
# "name" argument without having it get recreated.
2626
name_input = st.text_input("Enter a name", value="Streamlit")
2727
num_clicks = my_component(name_input, key="foo")
28-
st.markdown("You've clicked %s times!" % int(num_clicks))
28+
st.markdown("You've clicked %s times!" % int(num_clicks))

0 commit comments

Comments
 (0)