Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
b3bad51
#220 fix: stateless ref
diegoddox Apr 24, 2019
41cde08
docs: showCloseButton is false by default
stevemao May 4, 2019
1849eb3
Merge pull request #229 from stevemao/patch-3
diegoddox May 4, 2019
2c7b851
Allow latest react-redux as peer dependency
vzaidman May 6, 2019
5c0f7fd
Merge pull request #230 from vzaidman/patch-1
diegoddox May 6, 2019
b122bb0
Allow latest react-redux as peer dependency
diegoddox May 6, 2019
5dc19a1
Add configurable ID as a prop to assist with styling wrapper
C-Rodg May 10, 2019
6963278
Merge pull request #231 from C-Rodg/confirm_id
diegoddox May 12, 2019
e0441e9
Update Docs to show new id prop on confirm options
C-Rodg May 12, 2019
d2063b6
Merge pull request #232 from C-Rodg/confirm_id
diegoddox May 13, 2019
fc90e35
feat: confirm html id can be passed as props
diegoddox May 13, 2019
ab42814
Possibility to specify a11y ID
BilyachenkoOY Jun 24, 2019
756c901
Update ToastrBox.js
diegoddox Jun 26, 2019
6e84797
fix W3C validation errors
UncleJart Sep 29, 2019
03419d4
feat(getState): add ability to find state
TheSharpieOne Oct 1, 2019
c7ae933
feat: changeme update
diegoddox Oct 4, 2019
63442e7
fix: getState is not a function
diegoddox Oct 5, 2019
6c08418
fix close button keypress handler
traverse Nov 5, 2019
68a1bc3
Issue #250 - fix toastr blink before unmount due to hide animation cl…
More4ever Oct 11, 2019
390973d
release
diegoddox Nov 12, 2019
60e8cc1
fix wrong key string comparison
traverse Nov 15, 2019
ba000b4
fix enter key
diegoddox Nov 16, 2019
200ed2e
fix: auto focus on the close button
diegoddox Dec 4, 2019
23b836e
Added property to close confirm window when user clicks on shadow bac…
djulbicb May 5, 2020
e59b90d
Reverted specified server port in documentation
djulbicb May 14, 2020
935db08
issue #238 - propagate 7.6.4 fix to all toasts with disableAutoFocus
MirayaReie Dec 24, 2019
dd067ac
version bump
MirayaReie Dec 24, 2019
0d11cf0
version bump revert
MirayaReie Dec 24, 2019
43dfb51
fixing sass division issues
daveoneday Nov 13, 2021
c097e87
bump v
Nov 18, 2021
556dc7b
bum v
Nov 18, 2021
e64e8ea
update changelog
Nov 18, 2021
d355c97
prevent clearTimeout for onMouseEnter
IgorGorbov Jan 19, 2022
916b9af
bump
Jan 20, 2022
dd52c5f
Dependency updates
Szabadember Jan 30, 2022
976cf7e
linter fixes
Szabadember Jan 30, 2022
fbb1a99
update change log
Feb 2, 2022
7740238
Minimal improvements in functions isString and isBrowser (#278)
jcyber2017 Aug 7, 2022
f9022c1
update peerDependencies
Oct 3, 2022
5de9d20
Rename file extension of jsx files from .js to .jsx. (#282)
nphmuller Mar 1, 2023
8fb2a16
update peer
Mar 1, 2023
6bba116
Fix Toastr Removal Issue in React 18 (#287)
jefferdo Sep 20, 2023
0b48b42
bump version
Sep 20, 2023
b97a21c
Move react-refresh plugin to dev dependencies (#288)
printfn Nov 7, 2023
334d23e
fix dep
diegoddox Nov 7, 2023
cf5cd44
Add support for redux 5 and react-redux 9
printfn Jan 9, 2024
0867a11
Merge pull request #290 from printfn/redux-5
diegoddox Feb 23, 2024
f57d5b2
Add support for redux 5 and react-redux 9
diegoddox Feb 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"no-undef": 2,
"no-undef-init": 2,
"no-undefined": 0,
"no-unused-vars": 2,
"no-unused-vars": [2, { "argsIgnorePattern": "^_" }],
"no-use-before-define": 2,
"indent": [2, 2, {
"SwitchCase": 1
Expand Down
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,51 @@
# v8.0.0
Add support for redux 5 and react-redux 9
Thanks to @printfn

# v7.6.9
Minimal improvements in functions isString and isBrowser
Thanks to @cyber2017

# v7.6.8
Updated dependencies react@17
Thanks to @Szabadember

# v7.6.7
Fixes: [#262]
Thanks to @IgorGorbov

# v7.6.6
Fixes: [#269]
Thanks to @uxtx

# v7.6.4
Fixes: [#238]

`disableCloseButtonFocus` can be passed as a options in the toast methods in
order to prevent the auto focus.

# v7.6.1
Fix `getState` is not a function

# v7.6.0
Now you can define the toastr state path via a function
```
<ReduxToastr
{...anotherProps}
getState={(state) => state.toastr} // This is the default
/>
```

# v7.5.2
[#245] Fix W3C validation errors

# v7.4.10
Allow latest react-redux as peer dependency
[#230]

# v7.4.9
Fixies [#220]

# 7.0.0

# Breaking Changes
Expand Down
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ import ReduxToastr from 'react-redux-toastr'
newestOnTop={false}
preventDuplicates
position="top-left"
getState={(state) => state.toastr} // This is the default
transitionIn="fadeIn"
transitionOut="fadeOut"
progressBar
Expand Down Expand Up @@ -161,7 +162,7 @@ const toastrOptions = {
onHideComplete: () => console.log('HIDE: animation is done'),
onCloseButtonClick: () => console.log('Close button was clicked'),
onToastrClick: () => console.log('Toastr was clicked'),
showCloseButton: false, // true by default
showCloseButton: true, // false by default
closeOnToastrClick: true, // false by default, this will close the toastr when user clicks on it
component: ( // this option will give you a func 'remove' as props
<MyCustomComponent myProp="myValue">
Expand Down Expand Up @@ -229,6 +230,18 @@ const toastrConfirmOptions = {
toastr.confirm('Are you sure about that!', toastrConfirmOptions);
```

You can add a manually specified CSS ID selector to the confirmation wrapper element by:

- Including an `id` prop in the `toasterConfirmOptions` object:

```javascript
const toastrConfirmOptions = {
...
id: 'my-custom-id'
};
toastr.confirm('Are you sure about that!', toastrConfirmOptions);
```

You can change the `ok` and `cancel` texts by:

- Passing `confirmOptions` to the `ReduxToastr` component:
Expand Down Expand Up @@ -316,6 +329,19 @@ const toastrConfirmOptions = {

toastr.confirm(null, toastrConfirmOptions); // pass null for message
```
You can allow user to close confirm dialog by clicking in empty space

- Passing `closeOnShadowClick` in the `toasterConfirmOptions` object:

```javascript
const toastrConfirmOptions = {
...
closeOnShadowClick: true
};

toastr.confirm('You have timed out! Please log back in.', toastrConfirmOptions);
```


### Avatar: in case you wanna use the same avatar as in the example
[Avatar](https://github.com/diegoddox/react-redux-toastr/blob/master/development/Avatar.js)
Expand Down
2 changes: 1 addition & 1 deletion development/Avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ const styles = {

export default () => (
<div className="toastr-avatar" style={styles}>
<img src="./assets/jesus.jpg" style={{maxWidth: '105%'}}/>
<img src="./assets/jesus.jpg" alt="avatar" style={{maxWidth: '105%'}}/>
</div>
);
4 changes: 2 additions & 2 deletions development/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export default class Menu extends React.Component {
'In the beginning was the word',
'and the Word was with God, and the Word was God...',
{
timeOut: 10000,
position: 'top-left',
timeOut: 2000,
position: 'top-right',
progressBar: true,
width: '300px'
}
Expand Down
8 changes: 5 additions & 3 deletions development/client.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
'use strict';
import React from 'react';
import {render} from 'react-dom';
import createStore from './store';
import App from './App';
import ReactDOM from "react-dom/client";

const store = createStore();
const target = document.getElementById('app');
const root = ReactDOM.createRoot(document.getElementById("app"));

render(<App store={store} />, target);
root.render(
<App store={store} />
);
Loading