+ // Phones: three equal, thumb-sized tabs across the width. From sm up
+ // they shrink back to compact pills.
+
{(
[
["all", "All"],
@@ -80,10 +82,10 @@ export function QuizzesList() {
type="button"
onClick={() => setFilter(k)}
className={cn(
- "rounded-full px-3 py-1 text-sm transition-colors",
+ "min-h-10 rounded-full px-4 py-2 text-[15px] font-medium transition-colors sm:min-h-0 sm:px-3 sm:py-1 sm:text-sm sm:font-normal",
filter === k
? "bg-primary text-primary-foreground dark:text-white"
- : "text-muted-foreground hover:bg-muted hover:text-foreground",
+ : "bg-muted/60 text-muted-foreground hover:bg-muted hover:text-foreground sm:bg-transparent",
)}
>
{label}
@@ -101,19 +103,21 @@ export function QuizzesList() {
: "Nothing here."}
) : (
-
+ // minmax(0,1fr) + min-w-0: grid items otherwise refuse to shrink
+ // below their content, so one long word pushes a card off-screen.
+
{shown.map((q) => {
const done = q.my.state === "completed";
return (
- -
+
-
{KIND[q.target_kind]}
-
+
{q.title}
{q.target_title && (
@@ -121,14 +125,14 @@ export function QuizzesList() {
{q.target_title}
)}
-
+
{q.question_count}{" "}
{q.question_count === 1 ? "question" : "questions"}