Browse Source

Move TodoApp previews to compose-ui module (#1002)

pull/1037/head
Arkadii Ivanov 3 years ago committed by GitHub
parent
commit
1564fb5791
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      examples/todoapp/common/compose-ui/src/desktopMain/kotlin/example/todo/common/ui/TodoEditPreview.kt
  2. 7
      examples/todoapp/common/compose-ui/src/desktopMain/kotlin/example/todo/common/ui/TodoMainPreview.kt
  3. 5
      examples/todoapp/desktop/build.gradle.kts

7
examples/todoapp/desktop/src/jvmMain/kotlin/example/todo/desktop/TodoEditPreview.kt → examples/todoapp/common/compose-ui/src/desktopMain/kotlin/example/todo/common/ui/TodoEditPreview.kt

@ -1,8 +1,4 @@
/* package example.todo.common.ui
* Should be in the compose-ui module, see https://github.com/JetBrains/compose-jb/issues/908
*/
package example.todo.desktop
import androidx.compose.desktop.ui.tooling.preview.Preview import androidx.compose.desktop.ui.tooling.preview.Preview
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
@ -10,7 +6,6 @@ import com.arkivanov.decompose.value.MutableValue
import com.arkivanov.decompose.value.Value import com.arkivanov.decompose.value.Value
import example.todo.common.edit.TodoEdit import example.todo.common.edit.TodoEdit
import example.todo.common.edit.TodoEdit.Model import example.todo.common.edit.TodoEdit.Model
import example.todo.common.ui.TodoEditContent
@Composable @Composable
@Preview @Preview

7
examples/todoapp/desktop/src/jvmMain/kotlin/example/todo/desktop/TodoMainPreview.kt → examples/todoapp/common/compose-ui/src/desktopMain/kotlin/example/todo/common/ui/TodoMainPreview.kt

@ -1,8 +1,4 @@
/* package example.todo.common.ui
* Should be in the compose-ui module, see https://github.com/JetBrains/compose-jb/issues/908
*/
package example.todo.desktop
import androidx.compose.desktop.ui.tooling.preview.Preview import androidx.compose.desktop.ui.tooling.preview.Preview
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
@ -11,7 +7,6 @@ import com.arkivanov.decompose.value.Value
import example.todo.common.main.TodoItem import example.todo.common.main.TodoItem
import example.todo.common.main.TodoMain import example.todo.common.main.TodoMain
import example.todo.common.main.TodoMain.Model import example.todo.common.main.TodoMain.Model
import example.todo.common.ui.TodoMainContent
@Preview @Preview
@Composable @Composable

5
examples/todoapp/desktop/build.gradle.kts

@ -25,11 +25,6 @@ kotlin {
implementation(Deps.ArkIvanov.MVIKotlin.mvikotlinMain) implementation(Deps.ArkIvanov.MVIKotlin.mvikotlinMain)
implementation(Deps.Badoo.Reaktive.reaktive) implementation(Deps.Badoo.Reaktive.reaktive)
implementation(Deps.Badoo.Reaktive.coroutinesInterop) implementation(Deps.Badoo.Reaktive.coroutinesInterop)
// The dependencies below are required only for previews, see https://github.com/JetBrains/compose-jb/issues/908
implementation(compose.uiTooling)
implementation(project(":common:edit"))
implementation(project(":common:main"))
} }
} }
} }

Loading…
Cancel
Save