Skip to content

Commit

Permalink
refactor out component
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanKoech committed Mar 3, 2023
1 parent ed9a85b commit c9a9e70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.ryankoech.krypto.feature_home.presentation.components.loading
package com.ryankoech.krypto.common.presentation.components.loading

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
Expand All @@ -7,15 +7,13 @@ import androidx.compose.material.Surface
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.ryankoech.krypto.common.presentation.components.loading.loadingEffect
import com.ryankoech.krypto.common.presentation.theme.KryptoTheme

@Composable
fun CreditCardLoading(
fun BigCardLoading(
brush: Brush,
modifier: Modifier = Modifier,
){
Expand All @@ -34,13 +32,13 @@ fun CreditCardLoading(

@Preview
@Composable
fun CreditCardLoadingPreview(){
fun BigCardLoadingPreview(){

KryptoTheme {
Surface(modifier = Modifier.fillMaxSize()) {
val brush = loadingEffect()

Column{ CreditCardLoading(brush) }
Column{ BigCardLoading(brush) }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import com.ryankoech.krypto.common.presentation.components.loading.CoinCardLoadi
import com.ryankoech.krypto.common.presentation.components.loading.loadingEffect
import com.ryankoech.krypto.common.presentation.components.loading.LoadingText
import com.ryankoech.krypto.common.presentation.theme.KryptoTheme
import com.ryankoech.krypto.feature_home.presentation.components.loading.CreditCardLoading
import com.ryankoech.krypto.common.presentation.components.loading.BigCardLoading
import com.ryankoech.krypto.feature_home.presentation.components.loading.HomeScreenActionsLoading

const val TEST_TAG_HOME_SCREEN_LOADING = "test_tag_home_screen_loading"
Expand All @@ -28,7 +28,7 @@ fun HomeScreenLoading(

val brush = loadingEffect()

CreditCardLoading(brush)
BigCardLoading(brush)

Spacer(modifier = Modifier.height(32.dp))

Expand Down

0 comments on commit c9a9e70

Please sign in to comment.