Skip to content

Commit

Permalink
Update notification comp (#566)
Browse files Browse the repository at this point in the history
* Allow error comp to use timeout method

* Bump version
  • Loading branch information
kaytcat authored Jul 12, 2019
1 parent 7ebce3f commit 2a28019
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .storybook/manager-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@
</svg>
</a>

<script
async
src="https://cdn.polyfill.io/v2/polyfill.min.js?features=default,IntersectionObserver,Array.prototype.includes,Array.prototype.find,Array.prototype.findIndex,Intl.~locale.de,Intl.~locale.at,Intl.~locale.en,Intl.~locale.ch"
/>

<script>
document.title = 'Nukleus';
</script>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nukleus",
"version": "15.1.0",
"version": "15.1.1",
"description": "Shared components repo for kununu projects",
"main": "dist/components/index.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Notification/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default class Notification extends React.Component {

const {visible} = this.state;

if (visible && !this.isError()) {
if (visible) {
this.timeout = setTimeout(() => {
this.onTimeout();
}, duration);
Expand Down
1 change: 1 addition & 0 deletions src/components/Notification/story.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ storiesOf('Notification', module)
.add('error', () => (
<Notification
type="error"
closeMethod={text('closeMethod', 'onTimeout')}
onClose={action('onClose')}
message={text('message', 'Hi, I am an error notification box')}
icon={<i className="fa fa-cross" />}
Expand Down

0 comments on commit 2a28019

Please sign in to comment.