We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
Is there a way to add one time option for customClass{} ? better not repeating this for every single message. Thanks in advance.
sweetify.error( request, title='Error.', text='Text', persistent="Close", customClass={ 'icon': 'dark:color-pink-600', 'popup': 'dark:bg-slate-900 dark:text-slate-200', })
The text was updated successfully, but these errors were encountered:
I did it like this, if there is a better way plz share.
def sweeify_alert(request, tag, title, text, **kwargs): sweetify_functions = { 'success': sweetify.success, 'warning': sweetify.warning, 'error': sweetify.error, 'toast': sweetify.toast, 'info': sweetify.info } kwargs['text'] = text kwargs['title'] = title kwargs['showConfirmButton'] = True kwargs['timerProgressBar'] = False kwargs['allowOutsideClick'] = True kwargs['width'] = 500 kwargs['padding'] = '3em' kwargs['timer'] = None kwargs['backdrop'] = True sweetify_func = sweetify_functions.get(tag, sweetify.info) if tag == 'success' or tag == 'toast': kwargs['timer'] = 4000 kwargs['showConfirmButton'] = False return sweetify_func(request, customClass={ 'icon': 'mt-0', 'popup': 'dark:bg-slate-900 dark:text-slate-200 px-2 py-12', 'confirmButton': 'px-12', }, **kwargs)
Sorry, something went wrong.
No branches or pull requests
Hi,
Is there a way to add one time option for customClass{} ?
better not repeating this for every single message.
Thanks in advance.
The text was updated successfully, but these errors were encountered: