Skip to content

Commit 763c222

Browse files
committed
Update config file
1 parent 0cfcecd commit 763c222

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

config/laravel-oauth.php

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,24 +42,29 @@
4242
| Socialite buttons default style.
4343
| To use your own css classes, you can modify the following classes
4444
| and replace with yours. By default Boostrap buttons class are used
45+
| if you want to use outline buttons (which add 'btn-outline-provider' class)
46+
| you have to pass to outline index on buttons array to true
4547
|
4648
|
4749
| example:
4850
| 'buttons' => [
49-
| 'class' => 'btn btn-social'
50-
| 'icon' => false
51+
| 'class' => 'btn btn-social'
52+
| 'icon' => false,
53+
| 'outline' => false,
5154
| ]
5255
|
5356
| 'buttons' => [
54-
| 'class' => 'btn btn-social btn-block'
55-
| 'icon' => true
57+
| 'class' => 'btn btn-social btn-block'
58+
| 'icon' => true,
59+
| 'outline' => false,
5660
| ]
5761
|
5862
*/
5963

6064
'buttons' => [
61-
'class' => 'btn btn-social',
62-
'icon' => true,
65+
'class' => 'btn btn-social',
66+
'icon' => true,
67+
'outline' => false,
6368
],
6469

6570
];

src/LaravelSocialite.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ public function socialiteButtons(string $type)
1919
foreach ($providers as $provider => $status) {
2020
if ($status === true) {
2121

22-
$buttons .= '<a href="'.url("/auth/$provider").'" class="'.config('laravel-oauth.buttons.class').' btn-'.$provider.'">';
22+
if (config('laravel-oauth.buttons.outline') === true) {
23+
$buttons .= '<a href="'.url("/auth/$provider").'" class="'.config('laravel-oauth.buttons.class').' btn-outline-'.$provider.'">';
24+
} else {
25+
$buttons .= '<a href="'.url("/auth/$provider").'" class="'.config('laravel-oauth.buttons.class').' btn-'.$provider.'">';
26+
}
2327

2428
if (config('laravel-oauth.buttons.icon') === true) {
2529
$buttons .= "<i class='social-{$provider}'></i>";

0 commit comments

Comments
 (0)