Created
April 16, 2018 15:57
-
-
Save acacha/eb4f340cd8f377be14b18aea169f1d4a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
export default { | |
snackbarShow: state => state.show, | |
snackbarColor: state => state.color, | |
snackbarText: state => state.text, | |
snackbarSubtext: state => state.subText, | |
snackbarTimeout: state => state.timeout | |
} |
This file contains hidden or 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
import getters from './getters' | |
import mutations from './mutations' | |
const state = { | |
show: false, | |
color: 'error', | |
text: 'An error occurred', | |
subText: '', | |
timeout: 6000 | |
} | |
export default { | |
state, | |
getters, | |
mutations | |
} |
This file contains hidden or 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
import * as types from '../../mutation-types' | |
export default { | |
[ types.SET_SNACKBAR_SHOW ] (state, show) { | |
state.show = show | |
}, | |
[ types.SET_SNACKBAR_COLOR ] (state, color) { | |
state.color = color | |
}, | |
[ types.SET_SNACKBAR_TEXT ] (state, text) { | |
state.text = text | |
}, | |
[ types.SET_SNACKBAR_SUBTEXT ] (state, subText) { | |
state.subText = subText | |
}, | |
[ types.SET_SNACKBAR_TIMEOUT ] (state, timeout) { | |
state.timeout = timeout | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment