@smart-react-components/ui 2.0.8 → 2.0.10
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.
- package/Alert/index.js +3 -0
- package/Dropdown/DropdownItem.d.ts +1 -0
- package/Dropdown/DropdownItem.js +2 -2
- package/package.json +1 -1
package/Alert/index.js
CHANGED
|
@@ -19,6 +19,9 @@ const Alert = props => {
|
|
|
19
19
|
let iconRight = null;
|
|
20
20
|
for (let i = 0; i < children.length; i++) {
|
|
21
21
|
const item = children[i];
|
|
22
|
+
if (!item) {
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
22
25
|
if (((_a = item.type) === null || _a === void 0 ? void 0 : _a.displayName) === 'SRCAlertIcon') {
|
|
23
26
|
const iconEl = react_1.default.cloneElement(item, {
|
|
24
27
|
alertPalette: props.palette,
|
package/Dropdown/DropdownItem.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const WaveEffect_1 = __importDefault(require("../WaveEffect"));
|
|
8
8
|
const DropdownItemElement_1 = __importDefault(require("../components/Dropdown/DropdownItemElement"));
|
|
9
|
-
const DropdownItem = ({ children, elementProps = {}, hasHover, hasWaveEffect, isDisabled, isOutline, isSoft, onClick, palette, setStatus, waveEffectPalette }) => {
|
|
9
|
+
const DropdownItem = ({ children, elementProps = {}, hasHover, hasWaveEffect, isActive = false, isDisabled, isOutline, isSoft, onClick, palette, setStatus, waveEffectPalette }) => {
|
|
10
10
|
const isClicked = react_1.default.useRef(false);
|
|
11
11
|
const handleOnClick = (e) => {
|
|
12
12
|
if (isClicked.current || isDisabled) {
|
|
@@ -21,7 +21,7 @@ const DropdownItem = ({ children, elementProps = {}, hasHover, hasWaveEffect, is
|
|
|
21
21
|
isClicked.current = false;
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
-
const content = (react_1.default.createElement(DropdownItemElement_1.default, Object.assign({ cursor: "$cursor.dropdown", hasHover: hasHover, isActive:
|
|
24
|
+
const content = (react_1.default.createElement(DropdownItemElement_1.default, Object.assign({ cursor: "$cursor.dropdown", hasHover: hasHover, isActive: isActive, isDisabled: isDisabled, isHovered: false, isOutline: isOutline, isSoft: isSoft, palette: palette, onClick: handleOnClick }, elementProps), children));
|
|
25
25
|
return hasWaveEffect ? react_1.default.createElement(WaveEffect_1.default, { palette: waveEffectPalette }, content) : content;
|
|
26
26
|
};
|
|
27
27
|
exports.default = DropdownItem;
|