Surface

fun Surface(modifier: Modifier = Modifier, rounding: Dp? = null, shape: Shape = rounding?.let { RoundedCornerShape(it) } ?: RectangleShape, backgroundColor: Color = HandyTheme.colors.bgBasicDefault, contentColor: Color = LocalContentColor.current, border: BorderStroke? = null, content: @Composable () -> Unit)

Surface : 어떠한 상호작용도 없는 기본적인 Surface 입니다. 비상호작용적인 UI 요소로 사용됩니다.

Parameters

rounding

: Surface의 모서리의 둥글기

shape

: Surface의 전체 모양. 기본값 RectangleShape

backgroundColor

: Surface의 배경 색상. 기본값 bgBasicDefault(#0xFFFFFFFF)

contentColor

: Surface의 내부 content 색상

border

: Surface의 테두리 굵기

content

: Surface의 내부 content


fun Surface(onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, rounding: Dp? = null, shape: Shape = rounding?.let { RoundedCornerShape(it) } ?: RectangleShape, backgroundColor: Color = HandyTheme.colors.bgBasicDefault, contentColor: Color = LocalContentColor.current, border: BorderStroke? = null, interactionSource: MutableInteractionSource = remember { MutableInteractionSource()}, indication: Indication? = null, content: @Composable () -> Unit)

Clickable Surface : 클릭 가능한 Surface 입니다.

button, card 같은 클릭 이벤트가 필요한 곳에서 사용합니다.

Parameters

onClick

Surface 클릭 시 실행되는 함수

enabled

Surface 클릭 가능 여부

rounding

Surface 모서리의 둥글기

shape

Surface 전체 모양. 기본값 : RectangleShape

backgroundColor

Surface 배경 색상. 기본값 : bgBasicDefault(#0xFFFFFFFF)

contentColor

Surface 내부 content 색상

border

Surface 테두리 굵기

content

Surface 내부 content


fun Surface(onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, rounding: Dp? = null, shape: Shape = rounding?.let { RoundedCornerShape(it) } ?: RectangleShape, backgroundColor: Color = HandyTheme.colors.bgBasicDefault, contentColor: Color = LocalContentColor.current, border: BorderStroke? = null, shadowColor: Color = Color.Transparent, shadowElevation: Dp = 0.dp, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, indication: Indication? = null, content: @Composable () -> Unit)


fun Surface(selected: Boolean, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, rounding: Dp? = null, shape: Shape = rounding?.let { RoundedCornerShape(it) } ?: RectangleShape, backgroundColor: Color = HandyTheme.colors.bgBasicDefault, contentColor: Color = LocalContentColor.current, border: BorderStroke? = null, interactionSource: MutableInteractionSource = remember { MutableInteractionSource()}, indication: Indication? = null, content: @Composable () -> Unit)

Selectable Surface : 선택이 가능한 Surface 입니다.

selected 상태와 onClick 콜백이 필요한 RadioButton 같은 곳에서 사용합니다.

Parameters

selected

Surface 선택 여부

onClick

Surface 클릭 시 실행되는 함수

enabled

Surface 클릭 가능 여부

rounding

Surface 모서리의 둥글기

shape

Surface 전체 모양. 기본값 : RectangleShape

backgroundColor

Surface 배경 색상. 기본값 : bgBasicDefault(#0xFFFFFFFF)

contentColor

Surface 내부 content 색상

border

Surface 테두리 굵기

interactionSource

Surface 상호작용 소스

content

Surface 내부 content


fun Surface(checked: Boolean, onCheckedChange: (Boolean) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, rounding: Dp? = null, shape: Shape = rounding?.let { RoundedCornerShape(it) } ?: RectangleShape, backgroundColor: Color = HandyTheme.colors.bgBasicDefault, contentColor: Color = LocalContentColor.current, border: BorderStroke? = null, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, indication: Indication? = null, content: @Composable () -> Unit)

Toggleable Surface : 토글 기능이 있는 Surface 입니다.

checked 상태와 onCheckedChange 콜백이 필요한 checkBox 또는 Toggle 같은 곳에서 사용합니다.

Parameters

checked

: Surface 체크 여부

onCheckedChange

: Surface 체크 상태 변경 시 실행되는 함수

enabled

: Surface 클릭 가능 여부

rounding

: Surface 모서리의 둥글기

shape

: Surface 전체 모양. 기본값 : RectangleShape

backgroundColor

: Surface 배경 색상. 기본값 : bgBasicDefault(#0xFFFFFFFF)

contentColor

: Surface 내부 content 색상

border

: Surface 테두리 굵기

interactionSource

: Surface 상호작용 소스

content

: Surface 내부 content