@7shifts/sous-chef 3.94.0 → 3.95.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MicroBannerTheme } from './types';
|
|
3
|
-
import { PositionStyles } from 'foundation/types';
|
|
3
|
+
import { DataProps, PositionStyles } from '../../foundation/types';
|
|
4
4
|
type Props = {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
/** Banner design theme */
|
|
@@ -14,6 +14,6 @@ type Props = {
|
|
|
14
14
|
/** The primary CTA button */
|
|
15
15
|
primaryButton?: React.ReactElement;
|
|
16
16
|
testId?: string;
|
|
17
|
-
} & PositionStyles;
|
|
17
|
+
} & PositionStyles & DataProps;
|
|
18
18
|
declare const MicroBanner: React.FC<Props>;
|
|
19
19
|
export default MicroBanner;
|
package/dist/index.js
CHANGED
|
@@ -9688,15 +9688,19 @@ var MicroBanner = function MicroBanner(_ref) {
|
|
|
9688
9688
|
title = _ref.title,
|
|
9689
9689
|
primaryButton = _ref.primaryButton,
|
|
9690
9690
|
testId = _ref.testId,
|
|
9691
|
-
|
|
9692
|
-
var
|
|
9691
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$bd);
|
|
9692
|
+
var _getPositionProps = getPositionProps(rest),
|
|
9693
|
+
positionProps = _getPositionProps.positionProps,
|
|
9694
|
+
otherProps = _getPositionProps.otherProps;
|
|
9695
|
+
var _getDataProps = getDataProps(otherProps),
|
|
9696
|
+
dataProps = _getDataProps.dataProps;
|
|
9693
9697
|
var themeClass = styles$P["micro-banner--" + theme];
|
|
9694
9698
|
var contentClass = classnames__default["default"](styles$P['micro-banner__content'], hideIcon && styles$P['micro-banner__content--no-icon'], !primaryButton && styles$P['micro-banner__content--no-button']);
|
|
9695
|
-
return React__default["default"].createElement("div", {
|
|
9699
|
+
return React__default["default"].createElement("div", _extends({
|
|
9696
9700
|
"data-testid": testId,
|
|
9697
9701
|
className: classnames__default["default"](styles$P['micro-banner'], themeClass),
|
|
9698
|
-
style:
|
|
9699
|
-
}, !hideIcon && React__default["default"].createElement("div", {
|
|
9702
|
+
style: positionProps
|
|
9703
|
+
}, dataProps), !hideIcon && React__default["default"].createElement("div", {
|
|
9700
9704
|
className: styles$P['micro-banner__icon'],
|
|
9701
9705
|
"data-testid": (testId || 'micro-banner') + "-icon"
|
|
9702
9706
|
}, icon != null ? icon : React__default["default"].createElement(MicroBannerIcon, {
|