diff --git a/client/components/shared/Warning/Warning.tsx b/client/components/shared/Warning/Warning.tsx index a58776ad..aef0b071 100644 --- a/client/components/shared/Warning/Warning.tsx +++ b/client/components/shared/Warning/Warning.tsx @@ -1,23 +1,31 @@ import { Icon, Button } from '@mozilla/lilypad-ui'; import styles from './Warning.module.scss'; +import { ReactNode } from 'react'; type WarningPropsT = { - onClick: () => void; + onClick?: () => void; title: string; message: string; + children?: ReactNode; }; -const Warning = ({ onClick, title, message }: WarningPropsT) => ( +const Warning = ({ onClick, title, message, children }: WarningPropsT) => (

{title}

-

{message}

+

{message}

-
-
+ {children ?
{children}
: ''} + + {onClick ? ( +
+
+ ) : ( + '' + )}
); diff --git a/client/layouts/SidePanelLayout/SidePanelLayout.tsx b/client/layouts/SidePanelLayout/SidePanelLayout.tsx index 0b5a0813..34765934 100644 --- a/client/layouts/SidePanelLayout/SidePanelLayout.tsx +++ b/client/layouts/SidePanelLayout/SidePanelLayout.tsx @@ -7,6 +7,7 @@ import SkeletonCard from '@Shared/SkeletonCard/SkeletonCard'; import { SubscriptionT } from 'services/subscription.service'; import Hub, { loadingHub } from 'classes/Hub'; import Warning from '@Shared/Warning/Warning'; +import { Button } from '@mozilla/lilypad-ui'; type SidePanelLayoutProps = { children: ReactNode; @@ -32,12 +33,23 @@ const SidePanelLayout = ({
{ - window.open('mailto:hubs-feedback@mozilla.com'); - }} - /> + title="Content Storage Limit Exceeded" + message="You’ve reached the maximum data capacity for your current plan. To avoid performance issues with your Hub, please upgrade your plan or delete content from your Hub." + > +
+
+
)}