datariot:foundation-flash-messages

v0.2.0Published 9 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

foundation-flash-messages

A small package for displaying Foundation style flash messages. This is based on https://github.com/andreavaghi/meteor-flash-messages. Welcoming any pull requests that add thoughtfully to the package.

##Requirements You need to include the Foundation JS and CSS to support the alert boxes. You can do this by including them manually or by using meteor-foundation.

##Usage Install the package:

   mrt add foundation-flash-messages

Include the template somewhere in your index.html file:

1  {{> meteorMessages}}

And then send messages:

1  Messages.send(STYLE,MESSAGE);

And to clear messages:

1  Messages.clear();

For example:

1  Messages.send('alert', 'There was a problem signing you in.');
2  Messages.send('info', 'We will be shutting down in 10 minutes.');
3  Messages.send('success', 'Your account has been updated!');