diff --git a/apps/trading/components/header/header.tsx b/apps/trading/components/header/header.tsx
index 479b9a93e..7348604ea 100644
--- a/apps/trading/components/header/header.tsx
+++ b/apps/trading/components/header/header.tsx
@@ -15,7 +15,7 @@ export const Header = ({ title, children }: TradeMarketHeaderProps) => {
{Children.map(children, (child, index) => {
if (!child) return null;
diff --git a/libs/governance/src/components/asset-proposal-notification.tsx b/libs/governance/src/components/asset-proposal-notification.tsx
index 2dc3007e7..e1080dc5c 100644
--- a/libs/governance/src/components/asset-proposal-notification.tsx
+++ b/libs/governance/src/components/asset-proposal-notification.tsx
@@ -20,14 +20,19 @@ export const AssetProposalNotification = ({
const proposalLink = tokenLink(
TOKEN_PROPOSAL.replace(':id', proposal.id || '')
);
+ const message = (
+ <>
+ {t('Changes have been proposed for this asset.')}{' '}
+
{t('View proposal')}
+ >
+ );
return (
- {t('View proposal')}
-
+ className="mb-2"
+ />
);
}
diff --git a/libs/governance/src/components/market-proposal-notification.tsx b/libs/governance/src/components/market-proposal-notification.tsx
index dc4bc36c1..4a0ff39c0 100644
--- a/libs/governance/src/components/market-proposal-notification.tsx
+++ b/libs/governance/src/components/market-proposal-notification.tsx
@@ -20,14 +20,23 @@ export const MarketProposalNotification = ({
const proposalLink = tokenLink(
TOKEN_PROPOSAL.replace(':id', proposal.id || '')
);
+ const message = (
+
+ {t('Changes have been proposed for this market.')}{' '}
+
+ {t('View proposal')}
+
+
+ );
return (
-
- {t('View proposal')}
-
+
+
+
);
}
diff --git a/libs/ui-toolkit/src/components/notification/notification.stories.tsx b/libs/ui-toolkit/src/components/notification/notification.stories.tsx
index 494332d12..d618e856f 100644
--- a/libs/ui-toolkit/src/components/notification/notification.stories.tsx
+++ b/libs/ui-toolkit/src/components/notification/notification.stories.tsx
@@ -1,29 +1,33 @@
-import type { Meta, Story } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import { Intent } from '../../utils/intent';
-import { ExternalLink, Link } from '../link';
+import { Link } from '../link';
import { Notification } from './notification';
+import type { ComponentStory } from '@storybook/react';
export default {
component: Notification,
title: 'Notification',
} as Meta;
-const Template: Story = ({ intent, message, children }) => (
-
-
- {children}
-
+const Template: ComponentStory
= (props) => (
+
+
);
const props = {
- message: 'Exercitationem doloremque neque laborum incidunt consectetur amet',
- children: (
-
- Action
- External action
-
+ message: (
+ <>
+ This is a default message with an{' '}
+ optional link that
+ returns onto multiple lines.
+ >
),
+ title: 'Optional title',
+ buttonProps: {
+ text: 'Optional button',
+ action: () => alert('Optional button action'),
+ },
};
export const Default = Template.bind({});
@@ -36,22 +40,50 @@ export const Primary = Template.bind({});
Primary.args = {
...props,
intent: Intent.Primary,
+ message: (
+ <>
+ This is a info message with an{' '}
+ optional link that
+ returns onto multiple lines.
+ >
+ ),
};
export const Success = Template.bind({});
Success.args = {
...props,
intent: Intent.Success,
+ message: (
+ <>
+ This is a success message with an{' '}
+ optional link that
+ returns onto multiple lines.
+ >
+ ),
};
export const Warning = Template.bind({});
Warning.args = {
...props,
intent: Intent.Warning,
+ message: (
+ <>
+ This is a warning message with an{' '}
+ optional link that
+ returns onto multiple lines.
+ >
+ ),
};
export const Danger = Template.bind({});
Danger.args = {
...props,
intent: Intent.Danger,
+ message: (
+ <>
+ This is an error message with an{' '}
+ optional link that
+ returns onto multiple lines.
+ >
+ ),
};
diff --git a/libs/ui-toolkit/src/components/notification/notification.tsx b/libs/ui-toolkit/src/components/notification/notification.tsx
index 582e2a098..397b35482 100644
--- a/libs/ui-toolkit/src/components/notification/notification.tsx
+++ b/libs/ui-toolkit/src/components/notification/notification.tsx
@@ -4,12 +4,15 @@ import classNames from 'classnames';
import type { ReactNode } from 'react';
import { Intent } from '../../utils/intent';
import { Icon } from '../icon';
+import { Button } from '../button';
type NotificationProps = {
intent: Intent;
- message: string;
+ message: ReactNode | string;
+ title?: string;
+ buttonProps?: { text: string; action: () => void; className?: string };
testId?: string;
- children?: ReactNode;
+ className?: string;
};
const getIcon = (intent: Intent): IconName => {
@@ -26,8 +29,10 @@ const getIcon = (intent: Intent): IconName => {
export const Notification = ({
intent,
message,
+ title,
testId,
- children,
+ buttonProps,
+ className,
}: NotificationProps) => {
return (
-
-
- {message}
-
+
+
+
+ {title && (
+
+ {title}
+
+ )}
+
{message}
+ {buttonProps && (
+
+ {buttonProps.text}
+
+ )}
- {children}
);
};