HansTran commited on
Commit
5e483bd
·
verified ·
1 Parent(s): 8693000

Upload 6 files

Browse files
components/__pycache__/buttons.cpython-312.pyc CHANGED
Binary files a/components/__pycache__/buttons.cpython-312.pyc and b/components/__pycache__/buttons.cpython-312.pyc differ
 
components/buttons.py CHANGED
@@ -15,24 +15,22 @@ def render_add_card_button(on_click) -> None:
15
 
16
 
17
  def render_card_buttons(index: int, is_saved: bool, on_save, on_delete) -> None:
18
- save_col, delete_col = st.columns(2)
19
- with save_col:
20
- st.markdown('<div class="secondary-action">', unsafe_allow_html=True)
21
- st.button(
22
- "Update" if is_saved else "Save",
23
- key=f"save_{index}",
24
- use_container_width=True,
25
- on_click=on_save,
26
- args=(index,),
27
- )
28
- st.markdown("</div>", unsafe_allow_html=True)
29
- with delete_col:
30
- st.markdown('<div class="danger-action">', unsafe_allow_html=True)
31
- st.button(
32
- "Delete",
33
- key=f"delete_{index}",
34
- use_container_width=True,
35
- on_click=on_delete,
36
- args=(index,),
37
- )
38
- st.markdown("</div>", unsafe_allow_html=True)
 
15
 
16
 
17
  def render_card_buttons(index: int, is_saved: bool, on_save, on_delete) -> None:
18
+ st.markdown('<div class="secondary-action">', unsafe_allow_html=True)
19
+ st.button(
20
+ "Update" if is_saved else "Save",
21
+ key=f"save_{index}",
22
+ use_container_width=True,
23
+ on_click=on_save,
24
+ args=(index,),
25
+ )
26
+ st.markdown("</div>", unsafe_allow_html=True)
27
+
28
+ st.markdown('<div class="danger-action">', unsafe_allow_html=True)
29
+ st.button(
30
+ "Delete",
31
+ key=f"delete_{index}",
32
+ use_container_width=True,
33
+ on_click=on_delete,
34
+ args=(index,),
35
+ )
36
+ st.markdown("</div>", unsafe_allow_html=True)