Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/app/habits/habits.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,21 @@
background-color: var(--bgColor-success-emphasis, #1a7f37);
transition: width 0.3s ease;
}

.actionsStack {
margin-top: var(--base-size-12, 12px);
}

.sectionHeading {
font-size: 1.25rem;
}

.emptyHeading {
font-size: 1.125rem;
margin-top: var(--base-size-16, 16px);
}

.emptyText {
color: var(--fgColor-muted, #656d76);
margin-top: var(--base-size-8, 8px);
}
12 changes: 6 additions & 6 deletions src/components/Habits/habit-list-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function HabitCard({
)}

{showActions && habit.state === 'active' && (
<Stack direction="horizontal" gap="condensed" style={{ marginTop: 'var(--base-size-12)' }}>
<Stack direction="horizontal" gap="condensed" className={styles.actionsStack}>
{isPending && (
<>
<Button
Expand Down Expand Up @@ -243,7 +243,7 @@ export function HabitListSection({
<div className={styles.sectionHeader}>
<Stack direction="horizontal" gap="condensed" align="center">
<FlameIcon size={20} />
<Heading as="h2" style={{ fontSize: '1.25rem' }}>
<Heading as="h2" className={styles.sectionHeading}>
Active Habits
</Heading>
<CounterLabel>{activeHabits.length}</CounterLabel>
Expand All @@ -261,10 +261,10 @@ export function HabitListSection({
{activeHabits.length === 0 ? (
<div className={styles.emptyState}>
<FlameIcon size={48} className={styles.emptyIcon} />
<Heading as="h3" style={{ fontSize: '1.125rem', marginTop: 'var(--base-size-16)' }}>
<Heading as="h3" className={styles.emptyHeading}>
No active habits yet
</Heading>
<Text as="p" style={{ color: 'var(--fgColor-muted)', marginTop: 'var(--base-size-8)' }}>
<Text as="p" className={styles.emptyText}>
Start building better habits by creating your first one.
</Text>
</div>
Expand Down Expand Up @@ -293,7 +293,7 @@ export function HabitListSection({
<div className={styles.sectionHeader}>
<Stack direction="horizontal" gap="condensed" align="center">
<GraphIcon size={20} />
<Heading as="h2" style={{ fontSize: '1.25rem' }}>
<Heading as="h2" className={styles.sectionHeading}>
Completed Habits
</Heading>
<CounterLabel>{completedHabits.length}</CounterLabel>
Expand Down Expand Up @@ -324,7 +324,7 @@ export function HabitListSection({
<div className={styles.sectionHeader}>
<Stack direction="horizontal" gap="condensed" align="center">
<StopIcon size={20} />
<Heading as="h2" style={{ fontSize: '1.25rem' }}>
<Heading as="h2" className={styles.sectionHeading}>
Stopped Habits
</Heading>
<CounterLabel>{abandonedHabits.length}</CounterLabel>
Expand Down
Loading