Skip to content

Commit b31213d

Browse files
committed
feature: add zIndex prop
1 parent 8ffb5f2 commit b31213d

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

index.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from "react";
2+
import PropTypes from "prop-types";
23
import { Alert, Col } from "reactstrap";
34

45
class NotificationAlert extends React.Component {
@@ -133,7 +134,7 @@ class NotificationAlert extends React.Component {
133134
margin: "0px auto",
134135
position: "fixed",
135136
transition: "all 0.5s ease-in-out",
136-
zIndex: "9999"
137+
zIndex: this.props.zIndex
137138
};
138139
if (place.indexOf("t") !== -1) {
139140
style["top"] = "20px";
@@ -191,4 +192,12 @@ class NotificationAlert extends React.Component {
191192
}
192193
}
193194

195+
NotificationAlert.defaultProps = {
196+
zIndex: 9999
197+
};
198+
199+
NotificationAlert.propTypes = {
200+
zIndex: PropTypes.number
201+
}
202+
194203
export default NotificationAlert;

0 commit comments

Comments
 (0)