diff --git a/apps/client/src/features/base/components/base-view-draft-banner.tsx b/apps/client/src/features/base/components/base-view-draft-banner.tsx new file mode 100644 index 00000000..c3fdf10c --- /dev/null +++ b/apps/client/src/features/base/components/base-view-draft-banner.tsx @@ -0,0 +1,44 @@ +import { Paper, Group, Text, Button } from "@mantine/core"; +import { IconInfoCircle } from "@tabler/icons-react"; +import { useTranslation } from "react-i18next"; + +type BaseViewDraftBannerProps = { + isDirty: boolean; + canSave: boolean; + onReset: () => void; + onSave: () => void; + saving: boolean; +}; + +export function BaseViewDraftBanner({ + isDirty, + canSave, + onReset, + onSave, + saving, +}: BaseViewDraftBannerProps) { + const { t } = useTranslation(); + if (!isDirty) return null; + return ( + + + + + + {t("Filter and sort changes are visible only to you.")} + + + + + {canSave && ( + + )} + + + + ); +}