diff --git a/src/components/systemAlert/systemAlert.stories.tsx b/src/components/systemAlert/systemAlert.stories.tsx index d1ea5b2..f05149e 100644 --- a/src/components/systemAlert/systemAlert.stories.tsx +++ b/src/components/systemAlert/systemAlert.stories.tsx @@ -10,7 +10,6 @@ const meta: Meta = { }, tags: ['autodocs'], args: { - uid: '1', title: 'Ab dignissimos exercitationem laudantium magni voluptas.', onClose: () => {}, type: SystemAlertType.SUCCESS, diff --git a/src/components/systemAlert/systemAlert.tsx b/src/components/systemAlert/systemAlert.tsx index a5bb85a..7d8f1ce 100644 --- a/src/components/systemAlert/systemAlert.tsx +++ b/src/components/systemAlert/systemAlert.tsx @@ -9,7 +9,6 @@ const ERROR_DURATION = 7000; const DEFAULT_DURATION = 4000; export const SystemAlert: FC = ({ - uid, title, onClose, icon = null, @@ -21,11 +20,11 @@ export const SystemAlert: FC = ({ useEffect(() => { const timer = setTimeout(() => { - onClose(uid); + onClose(); }, adjustedDuration); return () => clearTimeout(timer); - }, [adjustedDuration, uid, onClose]); + }, [adjustedDuration, onClose]); const getIcon = (): ReactElement | null => { switch (type) { @@ -45,11 +44,7 @@ export const SystemAlert: FC = ({

{title}

- diff --git a/src/components/systemAlert/types.ts b/src/components/systemAlert/types.ts index 2b70403..8e3d6e3 100644 --- a/src/components/systemAlert/types.ts +++ b/src/components/systemAlert/types.ts @@ -5,9 +5,8 @@ export enum SystemAlertType { ERROR = 'error', } export interface SystemAlertProps { - uid: string | number; title: string; - onClose: (id: string | number) => void; + onClose: () => void; icon?: ReactElement | null; type?: SystemAlertType; duration?: number;