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

How to use this package in Bootstrap-Laravel? #33

Open
desyashasyi opened this issue Aug 20, 2021 · 2 comments
Open

How to use this package in Bootstrap-Laravel? #33

desyashasyi opened this issue Aug 20, 2021 · 2 comments

Comments

@desyashasyi
Copy link

I am wondering how to use this package in Laravel with Bootstrap?

@bucari
Copy link

bucari commented Apr 11, 2022

@desyashasyi if you converted it in bootstrap can you post the changes?

@IhsanDevs
Copy link

@desyashasyi if you converted it in bootstrap can you post the changes?

you can custom class style to bootstrap form-select like this:

<?php

namespace App\Http\Livewire\Custom\Components;

use Asantibanez\LivewireSelect\LivewireSelect;
use Illuminate\Support\Collection;

class Tags extends LivewireSelect
{

    public function options($searchTerm = null): Collection
    {
        return collect([
            [
                'value' => 'honda',
                'description' => 'Honda',
            ],
            [
                'value' => 'mazda',
                'description' => 'Mazda',
            ],
            [
                'value' => 'tesla',
                'description' => 'Tesla',
            ],
        ]);
    }

    public function styles() // Add this method for customing class element
    {
        return [
            'default' => 'form-select w-50',
        ];
    }
}

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

3 participants