react-hook-notification
Advanced tools
Comparing version 3.1.6 to 3.2.0
@@ -25,3 +25,3 @@ import React, { memo } from 'react'; | ||
}); | ||
return (React.createElement(Container, Object.assign({ ref: setElementRef, theme: themeSelected, key: id, role: "status", onClick: () => clickIsAllowed && onRemove(id), drag: draggable ? 'x' : false, dragSnapToOrigin: true, onDragEnd: onDragEnd, onDragStart: onDragStart, style: { x, opacity } }, containerAnimations), | ||
return (React.createElement(Container, Object.assign({ ref: setElementRef, theme: themeSelected, borderColor: showProgressBar ? 'no-border' : themeSelected, key: id, role: "status", onClick: () => clickIsAllowed && onRemove(id), drag: draggable ? 'x' : false, dragSnapToOrigin: true, onDragEnd: onDragEnd, onDragStart: onDragStart, style: { x, opacity } }, containerAnimations), | ||
withIcon && (React.createElement(IconContainer, { "aria-label": `Icon ${type}` }, | ||
@@ -28,0 +28,0 @@ React.createElement(Icon, { type: type, size: 20, color: colorsIcon[theme][type] }))), |
export declare const Container: import("@stitches/react/types/styled-component").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, { | ||
theme?: "default-colored" | "info-colored" | "warning-colored" | "success-colored" | "error-colored" | "default-light" | "info-light" | "warning-light" | "success-light" | "error-light" | "default-dark" | "info-dark" | "warning-dark" | "success-dark" | "error-dark" | undefined; | ||
borderColor?: "default-colored" | "info-colored" | "warning-colored" | "success-colored" | "error-colored" | "default-light" | "info-light" | "warning-light" | "success-light" | "error-light" | "default-dark" | "info-dark" | "warning-dark" | "success-dark" | "error-dark" | "no-border" | undefined; | ||
}, {}, import("@stitches/react/types/css-util").CSS<{}, {}, {}, {}>>; | ||
@@ -4,0 +5,0 @@ export declare const IconContainer: import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {}, import("@stitches/react/types/css-util").CSS<{}, {}, {}, {}>>; |
import { styled } from '@stitches/react'; | ||
import { motion } from 'framer-motion'; | ||
import { Colors } from '../../constants/Colors'; | ||
const themeLight = { | ||
@@ -11,2 +12,8 @@ color: 'var(--rhn-text-color-light)', | ||
}; | ||
const borderNone = { | ||
border: 'none', | ||
}; | ||
const borderDefault = { | ||
borderLeft: '5px solid', | ||
}; | ||
export const Container = styled(motion.div, { | ||
@@ -58,2 +65,20 @@ padding: '12px 12px', | ||
}, | ||
borderColor: { | ||
'default-colored': borderNone, | ||
'info-colored': borderNone, | ||
'warning-colored': borderNone, | ||
'success-colored': borderNone, | ||
'error-colored': borderNone, | ||
'no-border': borderNone, | ||
'default-light': Object.assign(Object.assign({}, borderDefault), { borderLeftColor: Colors.Grey }), | ||
'info-light': Object.assign(Object.assign({}, borderDefault), { borderLeftColor: Colors.Blue }), | ||
'warning-light': Object.assign(Object.assign({}, borderDefault), { borderLeftColor: Colors.Yellow }), | ||
'success-light': Object.assign(Object.assign({}, borderDefault), { borderLeftColor: Colors.Green }), | ||
'error-light': Object.assign(Object.assign({}, borderDefault), { borderLeftColor: Colors.Red }), | ||
'default-dark': Object.assign(Object.assign({}, borderDefault), { borderLeftColor: Colors.Grey }), | ||
'info-dark': Object.assign(Object.assign({}, borderDefault), { borderLeftColor: Colors.Blue }), | ||
'warning-dark': Object.assign(Object.assign({}, borderDefault), { borderLeftColor: Colors.Yellow }), | ||
'success-dark': Object.assign(Object.assign({}, borderDefault), { borderLeftColor: Colors.Green }), | ||
'error-dark': Object.assign(Object.assign({}, borderDefault), { borderLeftColor: Colors.Red }), | ||
}, | ||
}, | ||
@@ -60,0 +85,0 @@ }); |
{ | ||
"version": "3.1.6", | ||
"version": "3.2.0", | ||
"license": "MIT", | ||
@@ -4,0 +4,0 @@ "main": "dist/main/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56246
1341
82