diff --git a/src/Components/FunnelPage/Documentation/FunnelPage.stories.tsx b/src/Components/FunnelPage/Documentation/FunnelPage.stories.tsx
index e69a286a..86bca2d8 100644
--- a/src/Components/FunnelPage/Documentation/FunnelPage.stories.tsx
+++ b/src/Components/FunnelPage/Documentation/FunnelPage.stories.tsx
@@ -31,7 +31,6 @@ import {
ComponentSize,
Columns,
HeadingElement,
- Gradients,
} from '../../../Types'
// Notes
@@ -224,7 +223,6 @@ funnelPageExampleStories.add(
size={ComponentSize.Small}
visible={notificationState}
icon={IconFont.Zap}
- gradient={Gradients.KawaiiDesu}
onDismiss={handleDismissNotification}
>
Yeehaw I'm a notification
diff --git a/src/Components/Notification/Documentation/Notification.stories.tsx b/src/Components/Notification/Documentation/Notification.stories.tsx
index 6f10a46d..644b70df 100644
--- a/src/Components/Notification/Documentation/Notification.stories.tsx
+++ b/src/Components/Notification/Documentation/Notification.stories.tsx
@@ -10,7 +10,6 @@ import {
text,
select,
boolean,
- color,
number,
object,
} from '@storybook/addon-knobs'
@@ -31,7 +30,6 @@ import {Notification, NotificationDialog, NotificationDialogRef} from '../index'
import {
IconFont,
Gradients,
- InfluxColors,
Alignment,
VerticalAlignment,
ComponentSize,
@@ -231,7 +229,6 @@ notificationStories.add(
id={notification.id}
visible={notification.visible}
icon={notification.icon}
- gradient={notification.gradient}
onDismiss={handleDismiss}
size={ComponentSize.Small}
horizontalAlignment={notification.horizontalAlign}
@@ -285,15 +282,6 @@ notificationStories.add(
)
]
}
- gradient={
- Gradients[
- select(
- 'gradient',
- {None: 'none', ...mapEnumKeys(Gradients)},
- 'GarageBand'
- )
- ]
- }
color={
ComponentColor[
select(
@@ -303,7 +291,6 @@ notificationStories.add(
)
]
}
- backgroundColor={color('backgroundColor', `${InfluxColors.Castle}`)}
onDismiss={boolean('dismissable', true) ? handleClose : undefined}
>
{text('text', 'Congrats! The thing has happened!')}
diff --git a/src/Components/Notification/Notification.scss b/src/Components/Notification/Notification.scss
index 9fb4c141..76d29769 100644
--- a/src/Components/Notification/Notification.scss
+++ b/src/Components/Notification/Notification.scss
@@ -9,12 +9,11 @@ $cf-notification-screen-margin: $cf-space-s;
.cf-notification {
margin-bottom: $cf-space-3xs;
- color: $g18-cloud;
+ color: $cf-white;
display: inline-flex;
justify-content: space-between;
align-items: center;
- border-radius: $cf-radius;
- font-weight: $cf-font-weight--medium;
+ border-radius: $cf-radius * 2;
.cf-notification--contents {
display: inline-flex;
@@ -30,7 +29,7 @@ $cf-notification-screen-margin: $cf-space-s;
}
.cf-notification--icon {
- font-size: 1.125em;
+ font-size: 1.5em;
margin-right: $cf-space-s;
display: inline-flex;
flex-shrink: 0;
@@ -44,8 +43,8 @@ $cf-notification-screen-margin: $cf-space-s;
background-color: transparent;
background-image: none;
border: none;
- color: $g18-cloud;
- opacity: 0.6;
+ color: $cf-white;
+ font-size: 1.5em;
transition: opacity $cf-transition-default, transform $cf-transition-default;
&:active,
@@ -145,17 +144,17 @@ $cf-notification-screen-margin: $cf-space-s;
*/
.cf-notification__dark-text {
- color: rgba($g2-kevlar, 0.85);
+ color: $cf-grey-1;
.cf-notification--dismiss {
- color: rgba($g2-kevlar, 0.85);
+ color: $cf-grey-1;
}
}
.cf-notification__light-text {
- color: rgba($g20-white, 0.85);
+ color: $cf-white;
.cf-notification--dismiss {
- color: rgba($g20-white, 0.85);
+ color: $cf-white;
}
}
diff --git a/src/Components/Notification/Notification.tsx b/src/Components/Notification/Notification.tsx
index 1c57470c..621096ca 100644
--- a/src/Components/Notification/Notification.tsx
+++ b/src/Components/Notification/Notification.tsx
@@ -7,12 +7,7 @@ import * as easings from 'd3-ease'
import {NotificationDialog} from './NotificationDialog'
// Types
-import {
- Alignment,
- InfluxColors,
- VerticalAlignment,
- ComponentSize,
-} from '../../Types'
+import {Alignment, VerticalAlignment, ComponentSize} from '../../Types'
import {
NotificationDialogProps,
NotificationDialogRef,
@@ -52,11 +47,9 @@ export const NotificationRoot = forwardRef(
visible = true,
duration = Infinity,
children,
- gradient,
onDismiss,
className,
onTimeout,
- backgroundColor = InfluxColors.Castle,
verticalAlignment = VerticalAlignment.Top,
horizontalAlignment = Alignment.Right,
},
@@ -115,10 +108,8 @@ export const NotificationRoot = forwardRef(
visible &&
(props => (
void
/** Controls padding and font size of the notification */
@@ -54,31 +46,30 @@ export const NotificationDialog = forwardRef<
size,
icon,
style,
- color = '',
+ color = ComponentColor.Primary,
testID = 'notification',
children,
- gradient,
onDismiss,
className,
- backgroundColor = InfluxColors.Castle,
},
ref
) => {
- let internalGradient = gradient
- if (color) {
- const notificationThemes = {
- [ComponentColor.Primary]: Gradients.Info,
- [ComponentColor.Success]: Gradients.Success,
- [ComponentColor.Danger]: Gradients.Danger,
- }
+ const backgroundColorMap = {
+ [ComponentColor.Primary]: InfluxColors.DarkTurquoise,
+ [ComponentColor.Success]: InfluxColors.DarkGreen,
+ [ComponentColor.Danger]: InfluxColors.DarkRed,
+ }
- internalGradient = notificationThemes[color] || Gradients.Info
+ const highlightColorMap = {
+ [ComponentColor.Primary]: InfluxColors.Turquoise,
+ [ComponentColor.Success]: InfluxColors.Green,
+ [ComponentColor.Danger]: InfluxColors.Red,
}
+ const backgroundColor = backgroundColorMap[color]
+ const borderColor = highlightColorMap[color]
+ const iconColor = highlightColorMap[color]
- const textColor = calculateTextColorFromBackground(
- backgroundColor,
- internalGradient
- )
+ const textColor = calculateTextColorFromBackground(backgroundColor)
const notificationDialogClassName = classnames(
`cf-notification cf-notification__${color || 'default'}`,
@@ -91,12 +82,11 @@ export const NotificationDialog = forwardRef<
}
)
- const notificationDialogStyle = generateBackgroundStyle(
+ const notificationDialogStyle = {
backgroundColor,
- internalGradient,
- false,
- style
- )
+ border: `solid 1px ${borderColor}`,
+ ...style,
+ }
const handleDismiss = () => {
if (onDismiss) {
@@ -112,7 +102,13 @@ export const NotificationDialog = forwardRef<
style={notificationDialogStyle}
ref={ref}
>
- {!!icon && }
+ {!!icon && (
+
+ )}
diff --git a/src/Sandbox/Portals.stories.tsx b/src/Sandbox/Portals.stories.tsx
index d4fa837b..1d6ddb9c 100644
--- a/src/Sandbox/Portals.stories.tsx
+++ b/src/Sandbox/Portals.stories.tsx
@@ -20,13 +20,7 @@ import {InfluxDBCloudLogo} from '../Components/Logo'
import {AppWrapper} from '../Components/AppWrapper/AppWrapper'
// Types
-import {
- ComponentColor,
- IconFont,
- ComponentSize,
- Gradients,
- Appearance,
-} from '../Types'
+import {ComponentColor, IconFont, ComponentSize, Appearance} from '../Types'
// Notes
import PortalsReadme from './Portals.md'
@@ -322,7 +316,6 @@ alertStories.add(
I am notifying you!
diff --git a/src/Types/index.tsx b/src/Types/index.tsx
index b3718168..d56982d5 100644
--- a/src/Types/index.tsx
+++ b/src/Types/index.tsx
@@ -179,9 +179,26 @@ export enum ButtonType {
}
export enum InfluxColors {
+ // Brand Colors
+ Turquoise = '#5ee4e4',
+ Pink = '#f863b0',
+ Chartreuse = '#d6f622',
+
+ DarkTurquoise = '#1e3a46',
+ DarkLavender = '#2a2649',
+ DarkPink = '#482543',
+ DarkChartreuse = '#546120',
+
+ // Utility Colors
+ Green = '#53e51a',
+ Red = '#e65b5b',
+
+ DarkGreen = '#1b381f',
+ DarkRed = '#311c29',
Lavender = '#9394FF',
- Grey1 = '#0e101f',
+
// Grey
+ Grey1 = '#0e101f',
Grey5 = '#07070e',
Grey15 = '#1a1a2a',
Grey25 = '#333346',
@@ -267,7 +284,6 @@ export enum InfluxColors {
Flan = '#FFF7F4',
// Brand Colors
- Chartreuse = '#D6F622',
DeepPurple = '#13002D',
Magenta = '#BF2FE5',
Galaxy = '#9394FF',