Skip to content

Commit

Permalink
fix: role change and width fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mhomolak committed Jan 30, 2017
1 parent 633d82e commit 9d888d2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,19 @@ currently strings of 'success' or 'error'. `alertMessage` accepts a string for y

For example:

`document.body.dispatchEvent(new CustomEvent('triggerAlert', {
```js

document.body.dispatchEvent(new CustomEvent('triggerAlert', {
"detail":{
"alertList":[{
"id" : new Date().getTime(),
"alertType" : "success",
"alertMessage": "your alert message here"
}]
}
}));`
}));

```

Dispatch `clearAlert` to clear the array of events.

Expand Down
3 changes: 2 additions & 1 deletion src/js/AlertList.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ class AlertList extends Component {
return (
<ReactCSSTransitionGroup
component="ul"
role="alert"
transitionName="transition"
transitionEnterTimeout={300}
transitionLeaveTimeout={200}
transitionLeaveTimeout={200}
className="alertList">
{this.renderAlert(this.state.alertList)}
</ReactCSSTransitionGroup>
Expand Down
11 changes: 2 additions & 9 deletions src/scss/component-specific.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,9 @@
position:fixed;
}

@media only screen and (min-width: 1201px) {
@media only screen and (min-width: 769px) {
.alertList {
width: 25%;
}
}

@media only screen and (max-width: 1200px) {
.alertList {
width: 35%;
width: 30%;
}
}

Expand All @@ -34,7 +28,6 @@
}
}


li[id^="alert-error"] {
border-top: $alert-border-top #db0020;
}
Expand Down

0 comments on commit 9d888d2

Please sign in to comment.