Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat/#55] NextButton 구현 #57

Merged
merged 5 commits into from
Jan 19, 2025
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package com.spoony.spoony.presentation.register.componet

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.spoony.spoony.core.designsystem.component.button.SpoonyButton
import com.spoony.spoony.core.designsystem.theme.SpoonyAndroidTheme
import com.spoony.spoony.core.designsystem.type.ButtonSize
import com.spoony.spoony.core.designsystem.type.ButtonStyle

@Composable
fun NextButton(
enabled: Boolean,
onClick: () -> Unit
) {
SpoonyButton(
text = "다음",
size = ButtonSize.Xlarge,
style = ButtonStyle.Primary,
modifier = Modifier.fillMaxWidth(),
enabled = enabled,
onClick = onClick
)
}

@Preview
@Composable
private fun NextButtonPreview() {
var enabled by remember { mutableStateOf(true) }
Column(
modifier = Modifier
.background(Color.White)
.padding(16.dp)
) {
SpoonyAndroidTheme {
NextButton(enabled = enabled, onClick = { enabled = !enabled })
}
}
}
Loading