gah-datepicker
Advanced tools
Comparing version 1.2.1 to 1.2.2
14
index.js
@@ -758,2 +758,3 @@ "use strict"; | ||
onClose = _this$props12.onClose, | ||
onClear = _this$props12.onClear, | ||
mode = _this$props12.mode, | ||
@@ -763,3 +764,3 @@ disabled = _this$props12.disabled, | ||
var buttonStyle = { | ||
padding: "".concat(size / 24, "px ").concat(size / 12, "px") | ||
padding: "".concat(size / 36, "px 0") | ||
}; | ||
@@ -774,2 +775,6 @@ var closeText = { | ||
}[mode]; | ||
var clearText = { | ||
G: 'Clear', | ||
J: 'حذف' | ||
}[mode]; | ||
return /*#__PURE__*/_react.default.createElement("div", { | ||
@@ -790,3 +795,8 @@ className: "rdp-footer", | ||
} | ||
}, submitText)); | ||
}, submitText), typeof onClear === 'function' && !disabled && /*#__PURE__*/_react.default.createElement("button", { | ||
style: buttonStyle, | ||
onClick: function onClick() { | ||
return onClear(_this4.props.details); | ||
} | ||
}, clearText)); | ||
} | ||
@@ -793,0 +803,0 @@ }, { |
{ | ||
"name": "gah-datepicker", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
67857
1899