-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20031 from wordpress-mobile/feature/19802-designs…
…ystem-part2 Add screen navigation for Design System
- Loading branch information
Showing
9 changed files
with
214 additions
and
51 deletions.
There are no files selected for viewing
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
45 changes: 45 additions & 0 deletions
45
WordPress/src/main/java/org/wordpress/android/designsystem/DesignSystemComponentsScreen.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,45 @@ | ||
package org.wordpress.android.designsystem | ||
|
||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.lazy.LazyColumn | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.res.dimensionResource | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import org.wordpress.android.R | ||
|
||
@Composable | ||
fun DesignSystemComponentsScreen( | ||
modifier: Modifier = Modifier | ||
) { | ||
LazyColumn ( | ||
modifier = modifier, | ||
horizontalAlignment = Alignment.CenterHorizontally, | ||
verticalArrangement = Arrangement.spacedBy( | ||
dimensionResource(id = R.dimen.reader_follow_sheet_button_margin_top) | ||
) | ||
) { | ||
item { | ||
DesignSystemDataSource.componentsScreenButtonOptions.forEach { item -> | ||
SelectOptionButton( | ||
labelResourceId = item, | ||
onClick = {} | ||
) | ||
} | ||
} | ||
} | ||
} | ||
|
||
@Preview | ||
@Composable | ||
fun StartDesignSystemComponentsScreenPreview(){ | ||
DesignSystemComponentsScreen( | ||
modifier = Modifier | ||
.fillMaxSize() | ||
.padding(dimensionResource(R.dimen.button_container_shadow_height)) | ||
) | ||
} | ||
|
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
45 changes: 45 additions & 0 deletions
45
WordPress/src/main/java/org/wordpress/android/designsystem/DesignSystemFoundationScreen.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,45 @@ | ||
package org.wordpress.android.designsystem | ||
|
||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.lazy.LazyColumn | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.res.dimensionResource | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import org.wordpress.android.R | ||
|
||
@Composable | ||
fun DesignSystemFoundationScreen( | ||
modifier: Modifier = Modifier | ||
) { | ||
LazyColumn ( | ||
modifier = modifier, | ||
horizontalAlignment = Alignment.CenterHorizontally, | ||
verticalArrangement = Arrangement.spacedBy( | ||
dimensionResource(id = R.dimen.reader_follow_sheet_button_margin_top) | ||
) | ||
) { | ||
item { | ||
DesignSystemDataSource.foundationScreenButtonOptions.forEach { item -> | ||
SelectOptionButton( | ||
labelResourceId = item, | ||
onClick = {} | ||
) | ||
} | ||
} | ||
} | ||
} | ||
|
||
@Preview | ||
@Composable | ||
fun StartDesignSystemFoundationScreenPreview(){ | ||
DesignSystemFoundationScreen( | ||
modifier = Modifier | ||
.fillMaxSize() | ||
.padding(dimensionResource(R.dimen.button_container_shadow_height)) | ||
) | ||
} | ||
|
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
47 changes: 47 additions & 0 deletions
47
WordPress/src/main/java/org/wordpress/android/designsystem/DesignSystemStartScreen.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,47 @@ | ||
package org.wordpress.android.designsystem | ||
|
||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.lazy.LazyColumn | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.res.dimensionResource | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import org.wordpress.android.R | ||
|
||
@Composable | ||
fun DesignSystemStartScreen( | ||
onNextButtonClicked: (String) -> Unit, | ||
modifier: Modifier = Modifier | ||
) { | ||
LazyColumn ( | ||
modifier = modifier, | ||
horizontalAlignment = Alignment.CenterHorizontally, | ||
verticalArrangement = Arrangement.spacedBy( | ||
dimensionResource(id = R.dimen.reader_follow_sheet_button_margin_top) | ||
) | ||
) { | ||
item { | ||
DesignSystemDataSource.startScreenButtonOptions.forEach { item -> | ||
SelectOptionButton( | ||
labelResourceId = item.first, | ||
onClick = { onNextButtonClicked(item.second) } | ||
) | ||
} | ||
} | ||
} | ||
} | ||
|
||
@Preview | ||
@Composable | ||
fun StartDesignSystemStartScreenPreview(){ | ||
DesignSystemStartScreen( | ||
onNextButtonClicked = {}, | ||
modifier = Modifier | ||
.fillMaxSize() | ||
.padding(dimensionResource(R.dimen.button_container_shadow_height)) | ||
) | ||
} | ||
|
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