File tree Expand file tree Collapse file tree 2 files changed +24
-19
lines changed
core/designsystem/src/main/java/com/yapp/core/designsystem/component/button/text Expand file tree Collapse file tree 2 files changed +24
-19
lines changed Original file line number Diff line number Diff line change @@ -42,31 +42,36 @@ fun YappTextButtonBasic(
42
42
onClick : () -> Unit ,
43
43
) {
44
44
CompositionLocalProvider (value = LocalRippleConfiguration provides colors.ripple) {
45
- Row (
45
+ Box (
46
46
modifier = modifier
47
47
.clip(shape = shape)
48
48
.yappClickable(
49
49
runIf = enable,
50
50
onClick = onClick,
51
- )
52
- .padding(contentPaddings)
53
- .heightIn(min = textStyle.lineHeight.value.dp),
54
- verticalAlignment = Alignment .CenterVertically ,
51
+ ),
52
+ contentAlignment = Alignment .Center
55
53
) {
56
- if (leftIcon != null ) {
57
- leftIcon()
58
- Spacer (Modifier .width(leftIconSpacing))
59
- }
54
+ Row (
55
+ modifier = Modifier
56
+ .padding(contentPaddings)
57
+ .heightIn(min = textStyle.lineHeight.value.dp),
58
+ verticalAlignment = Alignment .CenterVertically ,
59
+ ) {
60
+ if (leftIcon != null ) {
61
+ leftIcon()
62
+ Spacer (Modifier .width(leftIconSpacing))
63
+ }
60
64
61
- Text (
62
- text = text,
63
- style = textStyle,
64
- color = colors.textColor(enable = enable),
65
- )
65
+ Text (
66
+ text = text,
67
+ style = textStyle,
68
+ color = colors.textColor(enable = enable),
69
+ )
66
70
67
- if (rightIcon != null ) {
68
- rightIcon()
69
- Spacer (Modifier .width(rightIconSpacing))
71
+ if (rightIcon != null ) {
72
+ Spacer (Modifier .width(rightIconSpacing))
73
+ rightIcon()
74
+ }
70
75
}
71
76
}
72
77
}
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ fun YappTextPrimaryButtonSmall(
86
86
87
87
@Preview(showBackground = true )
88
88
@Composable
89
- fun YappTextPrimaryButtonMediumPreview () {
89
+ private fun YappTextPrimaryButtonMediumPreview () {
90
90
YappTheme {
91
91
Column (verticalArrangement = Arrangement .spacedBy(12 .dp)) {
92
92
YappTextPrimaryButtonMedium (
@@ -105,7 +105,7 @@ fun YappTextPrimaryButtonMediumPreview() {
105
105
106
106
@Preview(showBackground = true )
107
107
@Composable
108
- fun YappTextPrimaryButtonSmallPreview () {
108
+ private fun YappTextPrimaryButtonSmallPreview () {
109
109
YappTheme {
110
110
Column (verticalArrangement = Arrangement .spacedBy(12 .dp)) {
111
111
YappTextPrimaryButtonSmall (
You can’t perform that action at this time.
0 commit comments