Enhance entry styling based on status
Updated the UI to change background, text color, and opacity for entries based on their status. This improves visual clarity and user feedback when toggling an entry's crossed-out state.
This commit is contained in:
@@ -322,16 +322,29 @@ export default function App() {
|
|||||||
|
|
||||||
<div style={{ display: "grid" }}>
|
<div style={{ display: "grid" }}>
|
||||||
{sec.entries.map((e) => (
|
{sec.entries.map((e) => (
|
||||||
<div key={e.entry_id} style={styles.row}>
|
<div
|
||||||
|
key={e.entry_id}
|
||||||
|
style={{
|
||||||
|
...styles.row,
|
||||||
|
background:
|
||||||
|
e.status === 1
|
||||||
|
? "rgba(255, 0, 0, 0.06)" // leicht rot
|
||||||
|
: "rgba(255,255,255,0.22)",
|
||||||
|
}}
|
||||||
|
>
|
||||||
{/* Name: Tap toggelt crossed */}
|
{/* Name: Tap toggelt crossed */}
|
||||||
<div
|
<div
|
||||||
onClick={() => toggleCross(e)}
|
onClick={() => toggleCross(e)}
|
||||||
style={{
|
style={{
|
||||||
...styles.name,
|
...styles.name,
|
||||||
textDecoration: e.status === 1 ? "line-through" : "none",
|
textDecoration: e.status === 1 ? "line-through" : "none",
|
||||||
opacity: e.status === 1 ? 0.85 : 1,
|
|
||||||
|
// ✅ Rot wenn gestrichen
|
||||||
|
color: e.status === 1 ? "#b10000" : "#20140c",
|
||||||
|
|
||||||
|
// optional etwas transparenter
|
||||||
|
opacity: e.status === 1 ? 0.75 : 1,
|
||||||
}}
|
}}
|
||||||
title="Tippen = durchstreichen"
|
|
||||||
>
|
>
|
||||||
{e.label}
|
{e.label}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user