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 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 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)
|
|
|
|
|
|