-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add entry list empty state (#28)
* Added empty state messages * moved no entries overlay component to page components * removed inline styling * Made NoEntriesOverlay into a separate component * chore: apply nits * chore: wrap text with Text component --------- Co-authored-by: ayoung19 <andyluyoung@gmail.com>
- Loading branch information
Showing
4 changed files
with
77 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Stack, Text } from "@mantine/core"; | ||
import type { ReactNode } from "react"; | ||
|
||
interface Props { | ||
title: ReactNode; | ||
subtitle?: ReactNode; | ||
description?: ReactNode; | ||
} | ||
|
||
export const NoEntriesOverlay = ({ title, subtitle, description }: Props) => { | ||
return ( | ||
<Stack align="center" spacing={0} p="xl"> | ||
<Text size="md">{title}</Text> | ||
{subtitle && ( | ||
<Text size="sm" color="dimmed"> | ||
{subtitle} | ||
</Text> | ||
)} | ||
{description && ( | ||
<Text size="xs" color="dimmed"> | ||
{description} | ||
</Text> | ||
)} | ||
</Stack> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters