Skip to content

Commit 4c7e176

Browse files
committed
Add example
1 parent acf05c4 commit 4c7e176

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import streamlit as st
2+
from streamlit_condition_tree import condition_tree
3+
4+
5+
config = {
6+
'fields': {
7+
'name': {
8+
'label': 'Name',
9+
'type': 'text',
10+
},
11+
'qty': {
12+
'label': 'Age',
13+
'type': 'number',
14+
'fieldSettings': {
15+
'min': 0
16+
},
17+
},
18+
'like_tomatoes': {
19+
'label': 'Likes tomatoes',
20+
'type': 'boolean',
21+
}
22+
}
23+
}
24+
25+
return_val = condition_tree(
26+
config,
27+
return_type='sql'
28+
)
29+
30+
st.write(return_val)

0 commit comments

Comments
 (0)