-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add copy buttons to response body and header table
- Loading branch information
1 parent
f759db9
commit a603124
Showing
5 changed files
with
140 additions
and
22 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
...vmMain/kotlin/com/sunnychung/application/multiplatform/hellohttp/ux/FloatingCopyButton.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.sunnychung.application.multiplatform.hellohttp.ux | ||
|
||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.layout.PaddingValues | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.unit.Dp | ||
import androidx.compose.ui.unit.dp | ||
import com.sunnychung.application.multiplatform.hellohttp.ux.local.LocalColor | ||
|
||
@Composable | ||
fun FloatingCopyButton(size: Dp = 20.dp, innerPadding: Dp = 4.dp, modifier: Modifier = Modifier, onClick: () -> Unit) { | ||
val colours = LocalColor.current | ||
AppImageButton( | ||
resource = "copy-to-clipboard.svg", | ||
size = size + innerPadding * 2, | ||
innerPadding = PaddingValues(innerPadding), | ||
color = colours.copyButton, | ||
onClick = onClick, | ||
modifier = modifier | ||
.background(colours.backgroundFloatingButton, RoundedCornerShape(4.dp)) | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.