refactor: consolidate badge styling to CSS classes
Deploy Development / deploy (push) Successful in 36s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 13s

- Move all positioning logic from inline styles to CSS
- New classes: .badge-container-right, .badge-button-layout
- All badge styling now in UsageBadge.css (single source)
- Easier to maintain and adjust globally
- Mobile responsive adjustments in one place

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 4.6 committed 2026-03-21 06:54:45 +01:00
1 parent 30df150b6f
commit baad096ead
4 files changed
+67 -13

No files matched your search

+14 -10
View File
@@ -379,21 +379,25 @@ export default function SettingsPage() {
</div>
)}
{canExport && <>
<button className="btn btn-primary btn-full" style={{position:'relative'}}
<button className="btn btn-primary btn-full"
onClick={()=>api.exportZip()}>
<div style={{display:'flex',alignItems:'center',justifyContent:'space-between',width:'100%'}}>
<span><Download size={14}/> ZIP exportieren</span>
{exportUsage && <UsageBadge {...exportUsage} />}
<div className="badge-button-layout">
<div className="badge-button-header">
<span><Download size={14}/> ZIP exportieren</span>
{exportUsage && <UsageBadge {...exportUsage} />}
</div>
<span className="badge-button-description">je eine CSV pro Kategorie</span>
</div>
<span style={{fontSize:11,opacity:0.8,display:'block',marginTop:2}}>je eine CSV pro Kategorie</span>
</button>
<button className="btn btn-secondary btn-full" style={{position:'relative'}}
<button className="btn btn-secondary btn-full"
onClick={()=>api.exportJson()}>
<div style={{display:'flex',alignItems:'center',justifyContent:'space-between',width:'100%'}}>
<span><Download size={14}/> JSON exportieren</span>
{exportUsage && <UsageBadge {...exportUsage} />}
<div className="badge-button-layout">
<div className="badge-button-header">
<span><Download size={14}/> JSON exportieren</span>
{exportUsage && <UsageBadge {...exportUsage} />}
</div>
<span className="badge-button-description">maschinenlesbar, alles in einer Datei</span>
</div>
<span style={{fontSize:11,opacity:0.8,display:'block',marginTop:2}}>maschinenlesbar, alles in einer Datei</span>
</button>
</>}
</div>