Skip to content

Latest commit

 

History

History
89 lines (69 loc) · 3.91 KB

api.md

File metadata and controls

89 lines (69 loc) · 3.91 KB

Modules

defaults : Object

Default configuration options for Snackify module.

module

Nuxt module for Snackify integration. This module sets up Snackify as a plugin in a Nuxt.js application and ensures Vuetify is present as a dependency.

parseObject

This function takes in a set of arguments and options and parses them into a single configuration object. If an error object is passed, it extracts the message and sets the color to 'error'. If an object is passed, it merges it with the default options. If a string is passed, it's considered as the message. If two arguments are passed, the first is treated as the message and the second as the color.

snackify

Nuxt plugin for Snackify, a notification system built on Vuetify's snackbar. It integrates with Nuxt's store to manage and display notifications in a queue.

defaults : Object

Default configuration options for Snackify module.

Properties

Name Type Description
msg string The default message to be displayed in the snackbar.
icon boolean Determines if an icon should be shown in the snackbar.
color string The theme color applied to the snackbar for styling.
class string Additional classes to apply to the snackbar for custom styling.
style string Inline styles to apply to the snackbar.
timeout number The duration in milliseconds for which the snackbar is visible.
top string If set, displays the snackbar at the top of the screen with the specified value.
bottom string If set, displays the snackbar at the bottom of the screen with the specified value.
left string If set, aligns the snackbar to the left side of the screen with the specified value.
right string If set, aligns the snackbar to the right side of the screen with the specified value.

module

Nuxt module for Snackify integration. This module sets up Snackify as a plugin in a Nuxt.js application and ensures Vuetify is present as a dependency.

Throws:

  • Will throw an error if Vuetify is not installed or configured.
Param Type Description
moduleOptions Object Configuration options for the Snackify module.

parse ⇒ Object

This function takes in a set of arguments and options and parses them into a single configuration object. If an error object is passed, it extracts the message and sets the color to 'error'. If an object is passed, it merges it with the default options. If a string is passed, it's considered as the message. If two arguments are passed, the first is treated as the message and the second as the color.

Returns: Object - The parsed configuration object for the notification.

Param Type Description
params Object The parameters object.
params.args Array The arguments passed to the snackify function.
params.options Object The options for customizing the snackify notification.

snackify

Nuxt plugin for Snackify, a notification system built on Vuetify's snackbar. It integrates with Nuxt's store to manage and display notifications in a queue.

Param Type Description
context Object The context provided by Nuxt.js for plugins.
inject function The method provided by Nuxt.js to inject functions into the context.