File size: 1,063 Bytes
21fe460
 
 
fd42852
0d872e9
deff3f3
21fe460
91258bf
21fe460
0d872e9
 
 
 
 
 
 
fd42852
91258bf
fd42852
91258bf
a706a46
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import streamlit as st


def render_top_buttons(on_add_click, on_add_tab_click, on_reset_click) -> None:
    left_col, name_col, tab_col, reset_col = st.columns([0.12, 0.54, 0.18, 0.16])
    with left_col:
        st.markdown('<div class="primary-action">', unsafe_allow_html=True)
        st.button("+ Add Card", use_container_width=True, on_click=on_add_click)
        st.markdown("</div>", unsafe_allow_html=True)
    with name_col:
        st.text_input(
            "Tab name",
            key="new_tab_name",
            placeholder="New tab name",
            label_visibility="collapsed",
        )
    with tab_col:
        st.markdown('<div class="check-action">', unsafe_allow_html=True)
        st.button("+ Add Tab", use_container_width=True, on_click=on_add_tab_click)
        st.markdown("</div>", unsafe_allow_html=True)
    with reset_col:
        st.markdown('<div class="reset-action">', unsafe_allow_html=True)
        st.button("Reset", use_container_width=True, on_click=on_reset_click)
        st.markdown("</div>", unsafe_allow_html=True)