robsontenorio / mary

Laravel Blade UI Components for Livewire 3
https://mary-ui.com
Other
910 stars 108 forks source link

Add Toast primary background color #528

Closed nerisonpitogo closed 1 month ago

nerisonpitogo commented 1 month ago

Please add a global toast background color that follows the app theme - primary. In this picture, we can see that the toast is not the same as the primary color. It can be done for each toast but could be better if I just call. $this->success('User created successfully'); rather than adding class for each toast call.

image

Something like this and each toast will have a bg-primary based on my theme. <x-mary-toast position="toast-top toast-center" class="bg-primary" />

nerisonpitogo commented 1 month ago

I am planning to add switches to let user select theme they want so that toast background must be based on the primary color.

robsontenorio commented 1 month ago

The Toast component follows daisyUI`s design system. The color schema is correct. If you change daisyUI theme the colors will change properly.

https://daisyui.com/components/toast/#toast-top-toast-start

nerisonpitogo commented 1 month ago

OMG. Been finding a solution for this since yesterday. Just to find out that the toast is on 'success' and my buttons are 'primary'. How to use the primary color as the background color instead of the success?

so instead of the $this->success('Permissions saved successfully'); can we use and the rest of the colors? $this->primary('Permissions saved successfully');

robsontenorio commented 1 month ago

You need to have a coherent color schema where primary color must not be the same as success color.