diff --git a/govtool/frontend/src/components/atoms/index.ts b/govtool/frontend/src/components/atoms/index.ts index fd9d803e1..5d03b0752 100644 --- a/govtool/frontend/src/components/atoms/index.ts +++ b/govtool/frontend/src/components/atoms/index.ts @@ -13,8 +13,6 @@ export * from "./modal/ModalWrapper"; export * from "./Radio"; export * from "./ScrollToManage"; export * from "./ScrollToTop"; -export * from "./snackbar/Snackbar"; -export * from "./snackbar/SnackbarMessage"; export * from "./StakeRadio"; export * from "./Tooltip"; export * from "./Typography"; diff --git a/govtool/frontend/src/components/atoms/snackbar/Snackbar.tsx b/govtool/frontend/src/components/atoms/snackbar/Snackbar.tsx deleted file mode 100644 index b1234c0a8..000000000 --- a/govtool/frontend/src/components/atoms/snackbar/Snackbar.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import type { GrowProps } from "@mui/material/Grow"; -import Grow from "@mui/material/Grow"; -import type { SnackbarProps } from "@mui/material/Snackbar"; -import MuiSnackbar from "@mui/material/Snackbar"; - -import { theme } from "@/theme"; -import type { SnackbarSeverity } from "@models"; - -function GrowTransition(props: GrowProps) { - return ; -} - -interface Props extends SnackbarProps { - severity: SnackbarSeverity; -} - -export function Snackbar({ severity, ...props }: Props) { - return ( - - ); -} diff --git a/govtool/frontend/src/components/atoms/snackbar/SnackbarMessage.tsx b/govtool/frontend/src/components/atoms/snackbar/SnackbarMessage.tsx deleted file mode 100644 index 8c4c34dd9..000000000 --- a/govtool/frontend/src/components/atoms/snackbar/SnackbarMessage.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { styled } from "@mui/material/styles"; - -import { ICONS } from "@consts"; -import type { SnackbarSeverity } from "@models"; - -interface Props { - message: string; - onClose?: (_event: React.SyntheticEvent | Event, reason?: string) => void; - severity: SnackbarSeverity; -} - -export function SnackbarMessage({ message, severity, onClose }: Props) { - return ( - - {severity === "success" ? ( - - ) : ( - - )} -
{message}
- {onClose && ( - close icon - )} -
- ); -} - -const SnackContainer = styled("span")` - align-items: center; - display: flex; - gap: 8px; - justify-content: space-between; - color: white; - font-weight: 500; - font-size: 14px; - line-height: 24px; - width: 100%; -`; diff --git a/govtool/frontend/src/context/snackbar.tsx b/govtool/frontend/src/context/snackbar.tsx index 584a09dd8..6e84b719c 100644 --- a/govtool/frontend/src/context/snackbar.tsx +++ b/govtool/frontend/src/context/snackbar.tsx @@ -9,7 +9,6 @@ import { } from "react"; import { Snackbar, Alert } from "@mui/material"; -import { SnackbarMessage } from "@atoms"; import { SnackbarSeverity } from "@models"; import { useScreenDimension, useTranslation } from "@hooks";