diff --git a/config/config.php b/config/config.php index 48d0ee9..1aa45b7 100755 --- a/config/config.php +++ b/config/config.php @@ -4,5 +4,21 @@ * You can place your custom package configuration in here. */ return [ + 'styles' => [ + 'default' => 'p-2 rounded border w-full appearance-none', -]; \ No newline at end of file + 'searchSelectedOption' => 'p-2 rounded border w-full bg-white flex items-center', + 'searchSelectedOptionTitle' => 'w-full text-gray-900 text-left', + 'searchSelectedOptionReset' => 'h-4 w-4 text-gray-500', + + 'search' => 'relative', + 'searchInput' => 'p-2 rounded border w-full rounded', + 'searchOptionsContainer' => 'absolute top-0 left-0 mt-12 w-full z-10', + + 'searchOptionItem' => 'p-3 hover:bg-gray-100 cursor-pointer text-sm', + 'searchOptionItemActive' => 'bg-indigo-600 text-white font-medium', + 'searchOptionItemInactive' => 'bg-white text-gray-600', + + 'searchNoResults' => 'p-8 w-full bg-white border text-center text-xs text-gray-600', + ] +]; diff --git a/src/LivewireSelect.php b/src/LivewireSelect.php index 3422f70..084556f 100755 --- a/src/LivewireSelect.php +++ b/src/LivewireSelect.php @@ -203,23 +203,7 @@ public function allDependenciesMet() public function styles() { - return [ - 'default' => 'p-2 rounded border w-full appearance-none', - - 'searchSelectedOption' => 'p-2 rounded border w-full bg-white flex items-center', - 'searchSelectedOptionTitle' => 'w-full text-gray-900 text-left', - 'searchSelectedOptionReset' => 'h-4 w-4 text-gray-500', - - 'search' => 'relative', - 'searchInput' => 'p-2 rounded border w-full rounded', - 'searchOptionsContainer' => 'absolute top-0 left-0 mt-12 w-full z-10', - - 'searchOptionItem' => 'p-3 hover:bg-gray-100 cursor-pointer text-sm', - 'searchOptionItemActive' => 'bg-indigo-600 text-white font-medium', - 'searchOptionItemInactive' => 'bg-white text-gray-600', - - 'searchNoResults' => 'p-8 w-full bg-white border text-center text-xs text-gray-600', - ]; + return config('livewire-select')['styles']; } public function render()