Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blade components support #28

Open
larxn opened this issue May 30, 2024 · 1 comment
Open

Blade components support #28

larxn opened this issue May 30, 2024 · 1 comment

Comments

@larxn
Copy link

larxn commented May 30, 2024

Hi. I wanted to create a reusable modal.blade.php component that encapsulates JS logic and markup. I made a slot for the actual content of the modal, so instead of

@include('partials.modal', ['slot' => '<strong>markup content</strong>'])

it would look like this:

<x-modal>
  <strong>markup content</strong>
<x-modal>

The thing is, when I try to use the component syntax, now WordPress throws an error. I've been following your tutorial series, but I'm not sure what's causing this error.

Have you been able to use the component syntax on your Laravel + WordPress boilerplate?

--

By the way: thank you so much for your pro-level content (:

@przemekhernik
Copy link
Owner

Hi @luveqz and thanks for this contribution 🎉 I must admit that I barely used such syntax since I approached component-driven development in WordPress a little bit differently, but that's perfect that you asked for this. I'm working on material that perfectly matches your question so I think I'll be able to check and provide an update soon 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants