livewire-select icon indicating copy to clipboard operation
livewire-select copied to clipboard

How to use this package in Bootstrap-Laravel?

Open desyashasyi opened this issue 3 years ago • 2 comments

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

desyashasyi avatar Aug 20 '21 23:08 desyashasyi

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

bucari avatar Apr 11 '22 07:04 bucari

@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',
        ];
    }
}

IhsanDevs avatar May 06 '22 08:05 IhsanDevs