Skip to content

Commit

Permalink
Adding textsize to GoogleSignIn button
Browse files Browse the repository at this point in the history
  • Loading branch information
mirzemehdi committed Jan 25, 2024
1 parent bf3fbc4 commit 2f970ac
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ kotlin.mpp.enableCInteropCommonization=true
#Development
development=true

kmpAuthVersion=1.0.0
kmpAuthVersion=1.1.0
2 changes: 1 addition & 1 deletion kmpauth-google/kmpauth_google.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'kmpauth_google'
spec.version = '1.0.0'
spec.version = '1.1.0'
spec.homepage = ''
spec.source = { :http=> ''}
spec.authors = ''
Expand Down
2 changes: 1 addition & 1 deletion kmpauth-uihelper/api/kmpauth-uihelper.api
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public final class com/mmk/kmpauth/uihelper/google/GoogleButtonMode$Neutral : co
}

public final class com/mmk/kmpauth/uihelper/google/GoogleSignInButtonKt {
public static final fun GoogleSignInButton (Landroidx/compose/ui/Modifier;Lcom/mmk/kmpauth/uihelper/google/GoogleButtonMode;Ljava/lang/String;Landroidx/compose/ui/graphics/Shape;Lkotlin/jvm/functions/Function0;Landroidx/compose/runtime/Composer;II)V
public static final fun GoogleSignInButton-1-gIjbk (Landroidx/compose/ui/Modifier;Lcom/mmk/kmpauth/uihelper/google/GoogleButtonMode;Ljava/lang/String;Landroidx/compose/ui/graphics/Shape;JLkotlin/jvm/functions/Function0;Landroidx/compose/runtime/Composer;II)V
public static final fun GoogleSignInButtonIconOnly (Landroidx/compose/ui/Modifier;Lcom/mmk/kmpauth/uihelper/google/GoogleButtonMode;Landroidx/compose/ui/graphics/Shape;Lkotlin/jvm/functions/Function0;Landroidx/compose/runtime/Composer;II)V
}

Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.unit.TextUnit
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.mmk.kmpauth.core.KMPAuthInternalApi
import com.mmk.kmpauth.core.di.isAndroidPlatform
import com.mmk.kmpauth.uihelper.apple.AppleButtonMode
import com.mmk.kmpauth.uihelper.theme.Fonts
import org.jetbrains.compose.resources.ExperimentalResourceApi
import org.jetbrains.compose.resources.painterResource
Expand Down Expand Up @@ -71,6 +72,7 @@ public fun GoogleSignInButton(
mode: GoogleButtonMode = GoogleButtonMode.Light,
text: String = "Sign in with Google",
shape: Shape = ButtonDefaults.shape,
fontSize: TextUnit = 14.sp,
onClick: () -> Unit,
) {

Expand All @@ -94,6 +96,7 @@ public fun GoogleSignInButton(
Text(
text = text,
maxLines = 1,
fontSize = fontSize,
fontFamily = Fonts.robotoFontFamily,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.mmk.kmpauth.firebase.apple.AppleButtonUiContainer
import com.mmk.kmpauth.firebase.github.GithubButtonUiContainer
import com.mmk.kmpauth.firebase.google.GoogleButtonUiContainerFirebase
Expand Down Expand Up @@ -109,12 +110,12 @@ fun AuthUiHelperButtonsAndFirebaseAuth(

//Google Sign-In Button and authentication with Firebase
GoogleButtonUiContainerFirebase(onResult = onFirebaseResult) {
GoogleSignInButton(modifier = Modifier.fillMaxWidth()) { this.onClick() }
GoogleSignInButton(modifier = Modifier.fillMaxWidth().height(44.dp), fontSize = 19.sp) { this.onClick() }
}

//Apple Sign-In Button and authentication with Firebase
AppleButtonUiContainer(onResult = onFirebaseResult) {
AppleSignInButton(modifier = Modifier.fillMaxWidth()) { this.onClick() }
AppleSignInButton(modifier = Modifier.fillMaxWidth().height(44.dp)) { this.onClick() }
}

}
Expand Down

0 comments on commit 2f970ac

Please sign in to comment.