Skip to content

Commit

Permalink
fix: CAlert: add innerRef prop
Browse files Browse the repository at this point in the history
  • Loading branch information
woothu committed Jul 17, 2020
1 parent ad88025 commit c1022a8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/alert/CAlert.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const CAlert = props => {
let {
children,
className,
innerRef,
//
onShowChange,
closeButton,
Expand Down Expand Up @@ -64,6 +65,7 @@ const CAlert = props => {
in={Boolean(isOpen)}
role="alert"
{...attrs}
innerRef={innerRef}
>
{ children }
{ closeButton && <CButtonClose onClick={() => setIsOpen(false)} />}
Expand All @@ -74,18 +76,17 @@ const CAlert = props => {
CAlert.propTypes = {
children: PropTypes.node,
className: PropTypes.string,
//
innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.string]),
onShowChange: PropTypes.func,
closeButton: PropTypes.bool,
color: PropTypes.string,
fade: PropTypes.bool,
show: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]),
};
}

CAlert.defaultProps = {
show: true,
fade: true
};
}

export default CAlert

0 comments on commit c1022a8

Please sign in to comment.