nova-toggle icon indicating copy to clipboard operation
nova-toggle copied to clipboard

Upgrade to V4

Open davidpiesse opened this issue 2 years ago • 5 comments

An initial version of Toggle for Nova V4.

davidpiesse avatar Jul 21 '22 11:07 davidpiesse

Feedback: The toggle without more options runs pretty well. Options like ->editableIndex() or ->falseColor('#bacad6') gets Errors

hoczeus avatar Jul 30 '22 09:07 hoczeus

Bump

muhammadsaeedparacha avatar Aug 17 '22 16:08 muhammadsaeedparacha

When using nova-toggle with Nova 4, there is a bug : in each create form, the save buttons are not well displayed. When inspecting the html elements, we can see that the css rules provided by the last version of this package conflict with the rules provided by Nova. The background color provided by Nova css class : .bg-primary-500 { background-color: rgba(var(--colors-primary-500)); } is overwritten by a rule provided by nova-toggle.css : [type=button], [type=reset], [type=submit], button { -webkit-appearance: button; background-color: transparent; background-image: none; } I think there is no need to export a css file with only the tailwind presets.

VGirol avatar Oct 03 '22 19:10 VGirol

In the dist/css/field.css file, you can safely remove all selectors that don't begin with tw-. To do so, you could use the postcss-purgecss-laravel package and modify the webpack.mix.js file as below :

.postCss('resources/sass/app.css', 'public/css', [ require('tailwindcss')(), require('postcss-purgecss-laravel')({ safelist: { greedy: [/^tw-/] } }), ]) I haven't tested it, but I think it might work.

VGirol avatar Oct 15 '22 08:10 VGirol

Ok, Disregard my two previous comments : after upgrading to the latest commit, everything is ok. I'm sorry for the inconvenience.

VGirol avatar Feb 04 '23 19:02 VGirol