From d7a889e702dd0c0eae094c83159be569a6f58b50 Mon Sep 17 00:00:00 2001 From: devilkiller-ag Date: Wed, 27 Mar 2024 12:45:08 +0530 Subject: [PATCH] migrated Warning --- components/Remember.tsx | 25 +++++++++++++++++++------ components/Warning.tsx | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 components/Warning.tsx diff --git a/components/Remember.tsx b/components/Remember.tsx index e15472a37c2..ebb206b4365 100644 --- a/components/Remember.tsx +++ b/components/Remember.tsx @@ -2,7 +2,7 @@ import LightBulb from './icons/LightBulb'; interface RememberProps { title?: string; - className: string; + className?: string; children: string; } @@ -13,12 +13,25 @@ interface RememberProps { * @param {string} props.className - Additional classes for the figure * @param {string} props.children - The content of the remember component */ -export default function Remember({ title = 'Remember', className, children }: RememberProps) { +export default function Remember({ + title = 'Remember', + className = '', + children, +}: RememberProps) { return ( -
-
- - +
+
+ + {title}
diff --git a/components/Warning.tsx b/components/Warning.tsx new file mode 100644 index 00000000000..dceff8014d5 --- /dev/null +++ b/components/Warning.tsx @@ -0,0 +1,34 @@ +import IconExclamation from './icons/Exclamation'; + +interface WarningProps { + title: string; + className?: string; + description: string; +} + +/** + * This component displays a warning component. + * @param {WarningProps} props - The props for the warning component + * @param {string} props.title - The title of the warning component + * @param {string} props.className - Additional classes for the figure + * @param {string} props.description - The content of the warning component + */ +export default function Warning({ className = '', title, description }: WarningProps) { + return ( +
+
+
+ +
+
+

+ {title} +

+
+

{description}

+
+
+
+
+ ); +}