forked from reactstrap/reactstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(alert): add ability to disable fade (reactstrap#1078)
Closes reactstrap#824
- Loading branch information
1 parent
e6a1313
commit c71f1d4
Showing
4 changed files
with
71 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from 'react'; | ||
import { UncontrolledAlert } from 'reactstrap'; | ||
import Alert from '../../../src/Alert'; | ||
|
||
export class AlertFadelessExample extends React.Component { | ||
|
||
constructor(props) { | ||
super(props); | ||
|
||
this.state = { | ||
visible: true | ||
}; | ||
|
||
this.onDismiss = this.onDismiss.bind(this); | ||
} | ||
|
||
onDismiss() { | ||
this.setState({ visible: false }); | ||
} | ||
|
||
render() { | ||
return ( | ||
<div> | ||
<Alert color="primary" isOpen={this.state.visible} toggle={this.onDismiss} fade={false}> | ||
I am a primary alert and I can be dismissed without animating! | ||
</Alert> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export function UncontrolledAlertFadelessExample() { | ||
return ( | ||
<div> | ||
<UncontrolledAlert color="info" fade={false}> | ||
I am an alert and I can be dismissed without animating! | ||
</UncontrolledAlert> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters