shows messages with arbitrary types. supports info, success, warning and error messages out of the box, and it's easy to add new message types.
npm install --save-exact @magic-modules/messages
export default {
// ...other config
HOIST: ['Messages'],
}
export const View = () => {
const msg = {
type: 'newType',
title: 'newType title',
content: 'newType content',
duration: 5,
}
return button({ onclick: [actions.messages.add, msg] })
}
// needed in the ssr step for now,
// gets overwritten by @magic-modules/messages with the correct actions.
export const actions = {
messages: {},
}
export const style = vars => ({
'.Messages': {
'.Message.newType': {
h3: {
color: vars.colors.pink[900],
},
},
},
}
})
first release
bump required node version to 14.15.4
update dependencies (@magic-libraries/db)
update dependencies (@magic-libraries/db)
...