tighten whitespace, DRY shell and buttons

This commit is contained in:
Abel Luck 2026-03-31 10:04:33 +02:00
parent 0b3b1b2731
commit a88eba7dd1
9 changed files with 439 additions and 225 deletions

View file

@ -5,7 +5,13 @@ from collections.abc import Mapping
import htpy as h
from htpy import Renderable
from repub.components import input_field, muted_action_link, page_shell, section_card
from repub.components import (
action_button,
input_field,
muted_action_link,
page_shell,
section_card,
)
def _value(settings: Mapping[str, object] | None, key: str, default: str = "") -> str:
@ -71,10 +77,12 @@ def settings_page(
],
h.div(class_="flex flex-wrap justify-end gap-3 pt-2")[
muted_action_link(href="/", label="Back to dashboard"),
h.button(
type="submit",
class_="rounded-full bg-slate-950 px-4 py-2.5 text-sm font-semibold text-white transition hover:bg-slate-800",
)["Save settings"],
action_button(
label="Save settings",
tone="dark",
emphasis="regular",
button_type="submit",
),
],
],
)