mirror of
https://github.com/we-promise/sure.git
synced 2026-05-30 07:49:01 +00:00
fix(savings_goals): equalize ONGOING/COMPLETED header spacing across cards and empty state
Move section gap from per-child mt-3 to a single mb-4 on the header, and toggle the grid wrapper hidden when no cards are visible. The previous markup gave inconsistent ONGOING-tag-to-content distance because the empty card sat below a 0-height grid, stacking margins differently than the cards layout.
This commit is contained in:
@@ -5,7 +5,7 @@ import { Controller } from "@hotwired/stimulus";
|
||||
// and data-goal-status; the controller toggles `.hidden` on cards
|
||||
// based on the active query/chip.
|
||||
export default class extends Controller {
|
||||
static targets = ["input", "chip", "card", "empty"];
|
||||
static targets = ["input", "chip", "card", "empty", "grid"];
|
||||
static values = { status: { type: String, default: "all" } };
|
||||
|
||||
connect() {
|
||||
@@ -32,6 +32,9 @@ export default class extends Controller {
|
||||
if (this.hasEmptyTarget) {
|
||||
this.emptyTarget.classList.toggle("hidden", visible > 0);
|
||||
}
|
||||
if (this.hasGridTarget) {
|
||||
this.gridTarget.classList.toggle("hidden", visible === 0);
|
||||
}
|
||||
}
|
||||
|
||||
selectChip(event) {
|
||||
|
||||
Reference in New Issue
Block a user