diff --git a/.changeset/three-shrimps-give.md b/.changeset/three-shrimps-give.md new file mode 100644 index 0000000000..a4253ce56b --- /dev/null +++ b/.changeset/three-shrimps-give.md @@ -0,0 +1,5 @@ +--- +'@kadena/react-ui': minor +--- + +Add max-width to notification content diff --git a/packages/libs/react-ui/src/components/Notification/Notification.css.ts b/packages/libs/react-ui/src/components/Notification/Notification.css.ts index f976c1b1e1..b0f131cf6a 100644 --- a/packages/libs/react-ui/src/components/Notification/Notification.css.ts +++ b/packages/libs/react-ui/src/components/Notification/Notification.css.ts @@ -20,14 +20,26 @@ export const containerClass = style([ alignItems: 'flex-start', borderRadius: '$sm', padding: '$md', - gap: '$md', borderStyle: 'solid', + justifyContent: 'center', }), { borderLeftWidth: vars.sizes.$1, }, ]); +export const containerWrapperClass = style([ + sprinkles({ + display: 'flex', + width: '100%', + alignItems: 'flex-start', + gap: '$md', + }), + { + maxWidth: 1440, + }, +]); + export const cardColorVariants = styleVariants(colorVariants, (color) => { return [ sprinkles({ diff --git a/packages/libs/react-ui/src/components/Notification/NotificationContainer.tsx b/packages/libs/react-ui/src/components/Notification/NotificationContainer.tsx index c3f784e167..bda3d66882 100644 --- a/packages/libs/react-ui/src/components/Notification/NotificationContainer.tsx +++ b/packages/libs/react-ui/src/components/Notification/NotificationContainer.tsx @@ -4,6 +4,7 @@ import { closeButtonClass, colorVariants, containerClass, + containerWrapperClass, contentClass, descriptionClass, displayVariants, @@ -60,22 +61,24 @@ export const NotificationContainer: FC = ({ return (
- +
+ -
- {title &&

{title}

} -
{children}
-
+
+ {title &&

{title}

} +
{children}
+
- {hasCloseButton && ( - - )} + {hasCloseButton && ( + + )} +
); };