Giter VIP home page Giter VIP logo

Comments (11)

driesvints avatar driesvints commented on July 25, 2024 1

I'm a bit stumped sorry. Everything seems to be okay code-wise. I'll need to fully test the package to know for sure what's going on but I don't have time for that atm, sorry. Appreciating any help here.

from blade-icons.

driesvints avatar driesvints commented on July 25, 2024 1

@xewl can you post a separate issue for that? Please be very detailed in how your config, code etc looks and what you expect that needs to happen.

from blade-icons.

driesvints avatar driesvints commented on July 25, 2024

Hey @JuanDeLeon. Looks like you didn't close the component properly:

@hasanyrole('Administrador|Ventas')
<x-menu.menu-item/>
@endhasanyrole

from blade-icons.

JuanDeLeon avatar JuanDeLeon commented on July 25, 2024

Hey, thanks for the response. I'm sorry I copied it wrong, but I even simplified my code and still getting this with the following:

sidebar-menu.blade.php
Captura de Pantalla 2020-06-21 a la(s) 10 58 10

components/menu/menu-item.blade.php
Captura de Pantalla 2020-06-21 a la(s) 10 59 03

result
Captura de Pantalla 2020-06-21 a la(s) 10 59 11

(Using the heroicons extension btw, but I don't think that's related to the issue.)

Edit: I just reverted all code (i.e. not using any icon component at all) and the issue persisted. I removed this package and the issue was gone.
So it seems to be a directive's conflict? I don't have that much experience there, so I still cannot figure it out.

from blade-icons.

driesvints avatar driesvints commented on July 25, 2024

Heya, it seems you're still referencing the icon incorrectly. Please note that you need to use a self closing tag (see my example) and not a slotted component as in your example.

from blade-icons.

driesvints avatar driesvints commented on July 25, 2024

Also, you're referencing the icon as o-home. Is this o-home.svg file present in your resources/svg directory? Can you please post your blade-icons.php config file?

from blade-icons.

JuanDeLeon avatar JuanDeLeon commented on July 25, 2024

Tried with self closing tags but it made no difference.
Should I not be using these x-icon components inside my menu/menu-item.blade.php component?

Yes the svg is present.
Icons are actually shown as expected, so I guess the config is correct.
Here it is:
(o-home.svg doesn't show but it's down below there, any icon I try in this list is shown correctly, but the permission directives are still ignored)

Captura de Pantalla 2020-06-21 a la(s) 11 55 26

from blade-icons.

driesvints avatar driesvints commented on July 25, 2024

hmm that's super strange. Can you post the contents of o-home.svg?

from blade-icons.

JuanDeLeon avatar JuanDeLeon commented on July 25, 2024

Sure, raw pasted:

<svg fill="none" viewBox="0 0 24 24" stroke="currentColor">
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"/>
</svg>

Adding source code result from browser. Altered the <a> classes a bit (and also using the s-adjustments icon here, but overall code is exactly the same). I'm pretty sure there's no typo or anything weird in there.

Captura de Pantalla 2020-06-21 a la(s) 12 18 19

from blade-icons.

xewl avatar xewl commented on July 25, 2024

I just noticed this one too; after switching from blade-svg (I was using the preview version, which worked fine)
The blade directives of spatie/laravel-permissions just stopped working after switching to this package from the preview branch.
Didn't matter if there was an icon in them or not; Lrvl/Blade just stops converting those to PHP.
(those, as in anything @role related)

Update 2020-06-28: For some reason, it now works again for me. 👌 (I tend to do composer update a lot, so..)

Also; [separate issue, if not related]
the default classes are not used anymore when adding another one via the class="" attribute.
Not overriding the class attribute, works as expected.
(unlike before in the preview, and the statement that it should append it @ readme)
Edit: Made a separate issue: #61

from blade-icons.

driesvints avatar driesvints commented on July 25, 2024

Hi all. I tried installing the package with blade icons and trying to use the directives together with the icons but everything works fine for me. I think it's best that you continue this on a different support channel like the Laracasts or Laravel.io forums or Laravel Discord.

                @hasanyrole('writer|admin')
                    I am either a writer or an admin or both!
                    <x-icon-camera class="h-5 fill-current"/>
                @else
                    I have none of these roles...
                    <x-icon-camera class="h-5 fill-current"/>
                @endhasanyrole

from blade-icons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.