Isolate CSS in BlocksPreview

I am creating previews for a "Builder (blockPreviews)" form with the new filament function. But it turns out that it inserts the blade view as is in my panel and I need to use the styles of my "front" and ignore those of filament that I am using as an admin panel only. I thought about creating iframes but there I should solve the way I send the props and the load would be slow. Has anyone considered this problem before?
4 Replies
awcodes
awcodes4mo ago
Yes. We are doing it now. You just have to be conscious of the context and will need to scope some of the overlapping colors, etc. but it is possible.
luciano.mizra
luciano.mizraOP4mo ago
Thanks if you have any PR where they are working on it, maybe I could finish it or find a solution
awcodes
awcodes4mo ago
I meant ‘we’ at work. Lol. And unfortunately it’s a private repo. If I have some time I’ll see if I can put together a demo.
luciano.mizra
luciano.mizraOP4mo ago
I created a solution for now that simply creates an iframe with a route where I assign a layout with everything my front requires and then the data is synchronized with that of the renderPreview(). file: resources\views\vendor\filament-forms\components\builder.blade.php
Want results from more Discord servers?
Add your server