Skip to content

Commit

Permalink
Use IconButtons where necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
Shade authored and Shade committed Oct 25, 2024
1 parent 3532d9a commit 74fd0e5
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions src/main/kotlin/ui/components/FormComponents.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package ui.components

import androidx.compose.foundation.clickable
import androidx.compose.foundation.hoverable
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.*
Expand Down Expand Up @@ -51,8 +50,8 @@ fun FormTextField(
onValueChange = onValueChange,
interactionSource = interactionSource,
modifier = Modifier
.fillMaxSize()
.padding(start = 14.dp, bottom = 3.dp),
.fillMaxSize()
.padding(start = 14.dp, bottom = 3.dp),
textStyle = TextStyle(
fontFamily = Font.RussoOne,
color = Color.White,
Expand Down Expand Up @@ -124,8 +123,8 @@ fun PasswordTextField(
onValueChange = onValueChange,
interactionSource = interactionSource,
modifier = Modifier
.fillMaxSize()
.padding(start = 14.dp, bottom = 3.dp),
.fillMaxSize()
.padding(start = 14.dp, bottom = 3.dp),
textStyle = TextStyle(
fontFamily = Font.RussoOne,
color = Color.White,
Expand All @@ -152,7 +151,7 @@ fun PasswordTextField(
checked = passwordVisible,
onCheckedChange = { passwordVisible = it },
modifier = Modifier.hoverable(interactionSource)
.pointerHoverIcon(PointerIcon.Hand)
.pointerHoverIcon(PointerIcon.Hand)
)
{
Icon(
Expand Down Expand Up @@ -307,22 +306,25 @@ fun UnderLineTextFiled(
else Icons.Default.Visibility,
contentDescription = "",
modifier = Modifier.size(width = 15.dp, height = 15.dp)
.clickable(enabled = true, onClick = { }, indication = null, interactionSource = interactionSource)
.pointerHoverIcon(PointerIcon.Default),
.pointerHoverIcon(PointerIcon.Default),
tint = Color.Gray
)
}
}
}
Column {
Icon(
imageVector = Icons.Default.ContentCopy,
contentDescription = "",
tint = Color.Gray,
modifier = Modifier.size(width = 15.dp, height = 15.dp)
.clickable(enabled = true, onClick = { }, indication = null, interactionSource = interactionSource)
.pointerHoverIcon(PointerIcon.Default)
)
IconButton(
interactionSource = interactionSource,
onClick = {}
) {
Icon(
imageVector = Icons.Default.ContentCopy,
contentDescription = "",
tint = Color.Gray,
modifier = Modifier.size(width = 15.dp, height = 15.dp)
.pointerHoverIcon(PointerIcon.Default)
)
}
}
if (isPassword) {
Spacer(modifier = Modifier.width(12.dp))
Expand Down

0 comments on commit 74fd0e5

Please sign in to comment.