sag_components 1.0.407 → 1.0.409
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.
|
@@ -18,6 +18,7 @@ var _IconButton = require("./IconButton.style");
|
|
|
18
18
|
const IconButton = props => {
|
|
19
19
|
const {
|
|
20
20
|
// downloadStatus,
|
|
21
|
+
fileName,
|
|
21
22
|
showProcess,
|
|
22
23
|
contentColor,
|
|
23
24
|
buttonText,
|
|
@@ -49,7 +50,6 @@ const IconButton = props => {
|
|
|
49
50
|
};
|
|
50
51
|
(0, _react.useEffect)(() => {
|
|
51
52
|
incrementProgress();
|
|
52
|
-
console.log('showProcess inside useEffect', showProcess);
|
|
53
53
|
}, [showProcess]);
|
|
54
54
|
const getIcon = icon => {
|
|
55
55
|
switch (icon) {
|
|
@@ -100,13 +100,14 @@ const IconButton = props => {
|
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
102
|
const onClickHandler = event => {
|
|
103
|
-
|
|
103
|
+
event.preventDefault();
|
|
104
104
|
onClick(event);
|
|
105
105
|
};
|
|
106
106
|
const onCancelClickHandler = event => {
|
|
107
107
|
onCancelClick(event);
|
|
108
108
|
};
|
|
109
109
|
return /*#__PURE__*/_react.default.createElement(_IconButton.ButtonWrapper, null, /*#__PURE__*/_react.default.createElement(_IconButton.IconButtonContainer, {
|
|
110
|
+
download: fileName,
|
|
110
111
|
backgroundColor: backgroundColor,
|
|
111
112
|
borderColor: borderColor,
|
|
112
113
|
borderRadius: borderRadius,
|
|
@@ -124,6 +125,7 @@ exports.IconButton = IconButton;
|
|
|
124
125
|
var _default = exports.default = IconButton;
|
|
125
126
|
IconButton.defaultProps = {
|
|
126
127
|
// downloadStatus: '',
|
|
128
|
+
fileName: '',
|
|
127
129
|
showProcess: false,
|
|
128
130
|
buttonText: '',
|
|
129
131
|
iconName: 'eye',
|
|
@@ -10,6 +10,6 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
10
10
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
11
11
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
12
12
|
const ButtonWrapper = exports.ButtonWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: fit-content;\n text-align: center;\n"])));
|
|
13
|
-
const IconButtonContainer = exports.IconButtonContainer = _styledComponents.default.
|
|
13
|
+
const IconButtonContainer = exports.IconButtonContainer = _styledComponents.default.a(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 14px;\n font-weight: 400;\n display: flex;\n gap: 10px;\n align-items: center;\n justify-content: center;\n padding: 12px 20px;\n margin-bottom: 5px;\n color: ", ";\n border-radius: ", ";\n border: 1px solid ", ";\n background: ", ";\n position: relative;\n transition: all .3s;\n ", "\n &:hover, &:focus {\n cursor: pointer;\n box-shadow: 5px 5px 10px 0px rgba(0, 0, 0, 0.1);\n }\n"])), props => props.color, props => props.borderRadius, props => props.borderColor.toString(), props => props.backgroundColor.toString(), props => props.inProgress && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n pointer-events: none;\n &:after {\n content: 'In Progress';\n display: flex;\n align-items: center;\n justify-content: center;\n text-wrap: nowrap;\n position: absolute;\n background: linear-gradient(\n to right,\n #5FCC70 ", "%,\n #B1B1B1 ", "%,\n #B1B1B1 100%\n );\n width: 100%;\n height: 100%;\n border-radius: ", ";\n border-width: 0;\n z-index: 9;\n }\n "])), props.progress, props.progress + 1, props => props.borderRadius));
|
|
14
14
|
const SpanText = exports.SpanText = _styledComponents.default.span(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n"])));
|
|
15
15
|
const CancelClick = exports.CancelClick = _styledComponents.default.span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: inherit;\n font-family: \"Lato\", sans-serif;;\n font-size: 14px;\n color: #568202;\n cursor: pointer;\n"])));
|