Skip to content

Commit

Permalink
Created Password Cards
Browse files Browse the repository at this point in the history
  • Loading branch information
aritra-tech committed Mar 16, 2024
1 parent e69c75c commit 5411380
Showing 1 changed file with 77 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
package com.geekymusketeers.uncrack.components

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.geekymusketeers.uncrack.R
import com.geekymusketeers.uncrack.ui.theme.OnPrimaryContainerLight
import com.geekymusketeers.uncrack.ui.theme.medium16
import com.geekymusketeers.uncrack.ui.theme.normal12

@Preview
@Composable
private fun PasswordCard(
modifier: Modifier = Modifier
) {
Row(
modifier = modifier
.fillMaxWidth()
.clip(RoundedCornerShape(10.dp))
.background(Color.White)
.padding(16.dp),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceBetween
) {

Image(
modifier = Modifier.size(42.dp),
painter = painterResource(id = R.drawable.instagram), // TODO: Need to change all the images
contentDescription = null
)

Column(
modifier = Modifier
.weight(1f)
.padding(horizontal = 16.dp),
verticalArrangement = Arrangement.SpaceBetween,
horizontalAlignment = Alignment.Start,
) {
Text(
text = "Instagram",
color = OnPrimaryContainerLight,
overflow = TextOverflow.Ellipsis,
maxLines = 1,
style = medium16
)

Spacer(modifier = Modifier.height(8.dp))

Text(
modifier = Modifier.alpha(0.75f),
text = stringResource(id = R.string.email_hint),
color = OnPrimaryContainerLight,
style = normal12
)
}
}
}

0 comments on commit 5411380

Please sign in to comment.