@@ -5,45 +5,33 @@ Object.defineProperty(exports, "__esModule", {
55} ) ;
66exports . default = void 0 ;
77var _react = _interopRequireDefault ( require ( "react" ) ) ;
8- var _Card = _interopRequireDefault ( require ( "@material-ui/core/Card" ) ) ;
9- var _CardContent = _interopRequireDefault ( require ( "@material-ui/core/CardContent" ) ) ;
108var _Typography = _interopRequireDefault ( require ( "@material-ui/core/Typography" ) ) ;
119var _styles = require ( "@material-ui/core/styles" ) ;
1210var _reactFontawesome = require ( "@fortawesome/react-fontawesome" ) ;
1311var _freeSolidSvgIcons = require ( "@fortawesome/free-solid-svg-icons" ) ;
12+ var _InfoMessageCard = _interopRequireDefault ( require ( "../Card/InfoMessageCard" ) ) ;
1413var _Theme = _interopRequireDefault ( require ( "../Theme/Theme" ) ) ;
1514var _typeUtil = require ( "../../util/typeUtil" ) ;
1615function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
1716var useStyles = ( 0 , _styles . makeStyles ) ( function ( theme ) {
1817 return {
19- card : {
20- backgroundColor : _Theme . default . colors . GOLD [ 50 ] ,
21- borderColor : _Theme . default . colors . GOLD [ 200 ] ,
22- marginTop : theme . spacing ( 1 )
23- } ,
24- cardContent : {
25- padding : theme . spacing ( 2 ) ,
26- paddingBottom : "" . concat ( theme . spacing ( 2 ) , "px !important" )
27- } ,
28- cardContentFlexContainer : {
29- display : 'flex' ,
30- alignItems : 'center' ,
31- padding : theme . spacing ( 2 ) ,
32- paddingBottom : "" . concat ( theme . spacing ( 2 ) , "px !important" )
33- } ,
34- cardContentContainer : {
35- flexGrow : 1
36- } ,
3718 cardIcon : {
38- color : theme . colors . GOLD [ 700 ] ,
39- padding : '5px' ,
40- fontSize : '2.3875em ' ,
19+ color : 'rgba(0, 0, 0, 0.9)' ,
20+ padding : '5px 0px ' ,
21+ fontSize : '1.5em ' ,
4122 marginRight : theme . spacing ( 2 )
4223 } ,
43- cardIconBoxesStacked : {
44- color : theme . colors . GOLD [ 700 ] ,
45- fontSize : '2.3875em' ,
46- marginRight : theme . spacing ( 2 )
24+ cardSecondaryIcon : {
25+ color : 'rgba(138, 191, 236, 0.9)' ,
26+ // theme.colors.LIGHT_BLUE[200] with 'a' value applied
27+ marginLeft : theme . spacing ( 2 ) ,
28+ fontSize : '1.5rem'
29+ } ,
30+ cardTitleContentContainer : {
31+ padding : theme . spacing ( 2 , 2.5 , 0.5 , 2.5 )
32+ } ,
33+ cardMessageContentContainer : {
34+ padding : theme . spacing ( 0.25 , 2.5 , 2 , 2.5 )
4735 }
4836 } ;
4937} ) ;
@@ -54,12 +42,7 @@ var DataProductBundleCard = function DataProductBundleCard(props) {
5442 detailContent = props . detailContent ,
5543 customContent = props . customContent ,
5644 isSplit = props . isSplit ,
57- showIcon = props . showIcon ,
5845 customClasses = props . classes ;
59- var customCardClass = customClasses ? customClasses . card : undefined ;
60- var customCardContentClass = customClasses ? customClasses . cardContent : undefined ;
61- var customCardContentFlexContainerClass = customClasses ? customClasses . cardContentFlexContainer : undefined ;
62- var customCardContentContainerClass = customClasses ? customClasses . cardContentContainer : undefined ;
6346 var customIconClass = customClasses ? customClasses . cardIcon : undefined ;
6447 var renderContent = function renderContent ( ) {
6548 if ( ( 0 , _typeUtil . exists ) ( customContent ) ) {
@@ -75,31 +58,27 @@ var DataProductBundleCard = function DataProductBundleCard(props) {
7558 variant : "body2"
7659 } , subTitleContent ) ) ;
7760 } ;
78- var renderCardContent = function renderCardContent ( ) {
79- if ( ! showIcon ) {
80- return renderContent ( ) ;
81- }
82- return /*#__PURE__*/ _react . default . createElement ( _react . default . Fragment , null , /*#__PURE__*/ _react . default . createElement ( _reactFontawesome . FontAwesomeIcon , {
61+ return /*#__PURE__*/ _react . default . createElement ( _InfoMessageCard . default , {
62+ title : "Data Product Bundle" ,
63+ messageContent : renderContent ( ) ,
64+ icon : /*#__PURE__*/ _react . default . createElement ( _reactFontawesome . FontAwesomeIcon , {
8365 icon : isSplit ? _freeSolidSvgIcons . faBoxesStacked : _freeSolidSvgIcons . faBox ,
84- size : "2x" ,
85- className : customIconClass || isSplit ? classes . cardIconBoxesStacked : classes . cardIcon
86- } ) , /*#__PURE__*/ _react . default . createElement ( "div" , {
87- className : customCardContentContainerClass || classes . cardContentContainer
88- } , renderContent ( ) ) ) ;
89- } ;
90- return /*#__PURE__*/ _react . default . createElement ( _Card . default , {
91- className : customCardClass || classes . card
92- } , /*#__PURE__*/ _react . default . createElement ( _CardContent . default , {
93- className : showIcon ? customCardContentFlexContainerClass || classes . cardContentFlexContainer : customCardContentClass || classes . cardContent
94- } , renderCardContent ( ) ) ) ;
66+ size : "1x" ,
67+ className : customIconClass || classes . cardIcon
68+ } ) ,
69+ classes : {
70+ secondaryIcon : classes . cardSecondaryIcon ,
71+ cardTitleContentContainer : classes . cardTitleContentContainer ,
72+ messageContentContainer : classes . cardMessageContentContainer
73+ }
74+ } ) ;
9575} ;
9676DataProductBundleCard . defaultProps = {
9777 titleContent : undefined ,
9878 detailContent : undefined ,
9979 subTitleContent : undefined ,
10080 customContent : undefined ,
10181 isSplit : false ,
102- showIcon : true ,
10382 classes : undefined
10483} ;
10584var _default = DataProductBundleCard ;
0 commit comments