Skip to content

Commit

Permalink
Create TextWithTextButton
Browse files Browse the repository at this point in the history
  • Loading branch information
yasanglass committed Mar 10, 2024
1 parent c321ce8 commit f234a2e
Showing 1 changed file with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package glass.yasan.concrete.component.group

import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import glass.yasan.concrete.component.ButtonText
import glass.yasan.concrete.component.Spacer
import glass.yasan.concrete.component.Text
import glass.yasan.spine.compose.foundation.grid

@Composable
public fun TextWithTextButton(
text: String,
buttonText: String,
onClick: () -> Unit,
modifier: Modifier = Modifier,
buttonModifier: Modifier = Modifier,
buttonStartIcon: ImageVector? = null,
buttonEndIcon: ImageVector? = null
) {
Column(
modifier = modifier
.fillMaxWidth(),
horizontalAlignment = Alignment.CenterHorizontally,
) {
Spacer(height = 2.grid)
Text(text = text)
Spacer(height = 2.grid)
ButtonText(
text = buttonText,
startIcon = buttonStartIcon,
endIcon = buttonEndIcon,
onClick = onClick,
modifier = buttonModifier,
)
Spacer(height = 2.grid)
}
}

0 comments on commit f234a2e

Please sign in to comment.