nova-toggle
nova-toggle copied to clipboard
Upgrade to V4
An initial version of Toggle for Nova V4.
Feedback: The toggle without more options runs pretty well. Options like ->editableIndex() or ->falseColor('#bacad6') gets Errors
Bump
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.
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.
Ok, Disregard my two previous comments : after upgrading to the latest commit, everything is ok. I'm sorry for the inconvenience.