|
1 | 1 | package com.firebase.ui.auth.compose
|
2 | 2 |
|
3 | 3 | import androidx.compose.foundation.Image
|
| 4 | +import androidx.compose.material3.Icon |
4 | 5 | import androidx.compose.foundation.layout.Arrangement
|
5 | 6 | import androidx.compose.foundation.layout.Column
|
6 | 7 | import androidx.compose.foundation.layout.Row
|
@@ -69,17 +70,31 @@ fun AuthProviderButton(
|
69 | 70 | containerColor = providerStyle.backgroundColor,
|
70 | 71 | contentColor = providerStyle.contentColor,
|
71 | 72 | ),
|
| 73 | + shape = providerStyle.shape, |
| 74 | + elevation = ButtonDefaults.buttonElevation( |
| 75 | + defaultElevation = providerStyle.elevation |
| 76 | + ), |
72 | 77 | onClick = onClick,
|
73 | 78 | enabled = enabled,
|
74 | 79 | ) {
|
75 | 80 | Row(
|
76 | 81 | verticalAlignment = Alignment.CenterVertically
|
77 | 82 | ) {
|
78 |
| - if (providerStyle.icon != null) { |
79 |
| - Image( |
80 |
| - painter = providerStyle.icon.painter, |
81 |
| - contentDescription = providerText |
82 |
| - ) |
| 83 | + val providerIcon = providerStyle.icon |
| 84 | + if (providerIcon != null) { |
| 85 | + val iconTint = providerStyle.iconTint |
| 86 | + if (iconTint != null) { |
| 87 | + Icon( |
| 88 | + painter = providerIcon.painter, |
| 89 | + contentDescription = providerText, |
| 90 | + tint = iconTint |
| 91 | + ) |
| 92 | + } else { |
| 93 | + Image( |
| 94 | + painter = providerIcon.painter, |
| 95 | + contentDescription = providerText |
| 96 | + ) |
| 97 | + } |
83 | 98 | Spacer(modifier = Modifier.width(8.dp))
|
84 | 99 | }
|
85 | 100 | Text(
|
|
0 commit comments