https://github.com/kimmelsg/cj-redux-notice
Display iOS style notices in your redux apps
https://github.com/kimmelsg/cj-redux-notice
Last synced: about 2 months ago
JSON representation
Display iOS style notices in your redux apps
- Host: GitHub
- URL: https://github.com/kimmelsg/cj-redux-notice
- Owner: kimmelsg
- Created: 2017-02-26T21:05:56.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-26T21:39:39.000Z (about 8 years ago)
- Last Synced: 2025-03-13T22:17:32.896Z (about 2 months ago)
- Language: JavaScript
- Size: 121 KB
- Stars: 4
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
##redux-notice
```
yarn add redux-notice
```This isn't quite finished yet, but here's what it would look like!
##Example

##Install
**Add the reducer**
```js
import reduxNotice from 'redux-notice/reducer'let reducers = combineReducers({
reduxNotice
})
```**Add the Notices component to the top level**
```js
import Notices from 'redux-notice/component'export default () => (
);```
**Dispatch some notices!**
```js
import { addNotice } from 'redux-notice'store.dispatch(
addNotice({
type: 'error',
text: 'You need to check your email and activate your account'
}),
);
```
##Options
**Component**
The notices component by default will display an icon, title and `text` that you pass to the `addNotice` action. You can change the actual component being rendered for each notice if [this](/component/index.js) isn't good enough for you:
```js
import Notices from 'redux-notice/component'
export default () => (
{error.text}
}
/>
);```