Skip to content

Commit

Permalink
[feat] : #8 component preview 함수 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
1971123-seongmin committed Nov 6, 2024
1 parent 5537e13 commit 0a3bc75
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import org.sopt.and.R
import org.sopt.and.ui.theme.WavveBlue
import org.sopt.and.ui.theme.White

Expand All @@ -38,4 +41,13 @@ fun RoundedButton(
textAlign = TextAlign.Center
)
}
}
}

@Preview(showBackground = true)
@Composable
fun PreviewRoundedButton() {
RoundedButton(
content = stringResource(R.string.signin), // 버튼의 예시 텍스트
onClick = {} // 빈 onClick 함수
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import org.sopt.and.R
import org.sopt.and.ui.theme.Gray100
import org.sopt.and.ui.theme.Gray200

Expand Down Expand Up @@ -46,4 +48,10 @@ fun SocialLoginTextDriver(@StringRes content: Int) {
color = Gray200
)
}
}

@Preview(showBackground = true)
@Composable
fun PreviewSocialLoginTextDriver() {
SocialLoginTextDriver(content = R.string.sign_social) // 예시 문자열 리소스를 전달
}

0 comments on commit 0a3bc75

Please sign in to comment.