@@ -28,31 +28,46 @@ fun GalleryHeader(
2828 title : String = DEFAULT_HEADER_TITLE ,
2929 titleSize : Int = DEFAULT_HEADER_TITLE_SIZE ,
3030 titleColor : Long = Color .White .value.toLong(),
31- actionIcon : ImageVector = Icons .Default .Close ,
31+ rightActionIcon : ImageVector = Icons .Default .Close ,
32+ leftActionIcon : ImageVector = Icons .Default .Close ,
3233 paddingVertical : Int = DEFAULT_HEADER_PADDING_VERTICAL ,
3334 paddingHorizontal : Int = DEFAULT_HEADER_PADDING_HORIZONTAL ,
35+ verticalAlignment : Alignment .Vertical = Alignment .CenterVertically ,
36+ onRightActionClick : (() -> Unit )? = null,
3437 onLeftActionClick : (() -> Unit )? = null
3538) {
3639 if (title.isEmpty()) return
3740 Row (
3841 modifier = modifier
3942 .fillMaxWidth()
4043 .padding(vertical = paddingVertical.dp, horizontal = paddingHorizontal.dp),
41- verticalAlignment = Alignment . CenterVertically
44+ verticalAlignment = verticalAlignment
4245 ) {
46+ onLeftActionClick?.let {
47+ Icon (
48+ modifier = Modifier .clickable {
49+ onLeftActionClick()
50+ },
51+ imageVector = leftActionIcon,
52+ contentDescription = " " ,
53+ tint = Color (titleColor.toULong())
54+ )
55+ }
4356 Text (
44- modifier = Modifier .weight(1f ),
57+ modifier = Modifier
58+ .weight(1f )
59+ .padding(horizontal = 10 .dp),
4560 text = title,
4661 color = Color (titleColor.toULong()),
4762 fontSize = titleSize.sp,
4863 fontWeight = FontWeight .Bold
4964 )
50- onLeftActionClick ?.let {
65+ onRightActionClick ?.let {
5166 Icon (
5267 modifier = Modifier .clickable {
53- onLeftActionClick ()
68+ onRightActionClick ()
5469 },
55- imageVector = actionIcon ,
70+ imageVector = rightActionIcon ,
5671 contentDescription = " " ,
5772 tint = Color (titleColor.toULong())
5873 )
0 commit comments