Skip to content

Commit

Permalink
Fix preview
Browse files Browse the repository at this point in the history
  • Loading branch information
mdrlzy committed Feb 2, 2025
1 parent c14c769 commit 3d47988
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
1 change: 1 addition & 0 deletions feature/quick/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ dependencies {
implementation(libs.androidx.ui)
implementation(libs.navigation.compose)
implementation(libs.material3)
implementation(libs.androidx.ui.tooling)
implementation(libs.androidx.ui.tooling.preview)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.activity.compose)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,18 +181,17 @@ fun AddQuickScreen(
}
}

@Preview(showBackground = true, widthDp = 400)
@Composable
private fun Content(
state: AddQuickScreenState = AddQuickScreenState(),
onAmountChanged: (String) -> Unit = {},
onNewCurrencyClick: () -> Unit = {},
onCurrencyRemove: (Int) -> Unit = {},
onGroupSelect: (String) -> Unit = {},
onCodeChange: (Int) -> Unit = {},
onSwapClick: () -> Unit = {},
onPairsSwap: (from: Int, to: Int) -> Unit = { _, _ -> },
onAddAsset: () -> Unit = {},
state: AddQuickScreenState,
onAmountChanged: (String) -> Unit,
onNewCurrencyClick: () -> Unit,
onCurrencyRemove: (Int) -> Unit,
onGroupSelect: (String) -> Unit,
onCodeChange: (Int) -> Unit,
onSwapClick: () -> Unit,
onPairsSwap: (from: Int, to: Int) -> Unit,
onAddAsset: () -> Unit,
) {
var showNewGroupDialog by remember { mutableStateOf(false) }
var showGroupsPopup by remember { mutableStateOf(false) }
Expand Down Expand Up @@ -622,3 +621,19 @@ private fun SwapBtn(
)
}
}

@Preview(showBackground = true, widthDp = 400)
@Composable
fun Preview() {
Content(
state = AddQuickScreenState(),
onAmountChanged = {},
onNewCurrencyClick = {},
onCurrencyRemove = {},
onGroupSelect = {},
onCodeChange = {},
onSwapClick = {},
onPairsSwap = { _, _ -> },
onAddAsset = {},
)
}

0 comments on commit 3d47988

Please sign in to comment.