-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
10 changed files
with
169 additions
and
58 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
core/ui/src/main/kotlin/nl/q42/template/ui/compose/composables/widgets/TemplateButton.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,33 @@ | ||
package nl.q42.template.ui.compose.composables.widgets | ||
|
||
import androidx.compose.material3.Button | ||
import androidx.compose.material3.ButtonDefaults | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import nl.q42.template.ui.theme.AppTheme | ||
import nl.q42.template.ui.theme.PreviewLightDark | ||
|
||
@Composable | ||
fun TemplateButton(text: String, onClick: () -> Unit) { | ||
Button( | ||
onClick = onClick, | ||
colors = ButtonDefaults.buttonColors( | ||
containerColor = AppTheme.colors.accent, | ||
contentColor = AppTheme.colors.buttonText | ||
) | ||
) { | ||
Text( | ||
text = text, | ||
style = AppTheme.typography.body, | ||
color = AppTheme.colors.buttonText | ||
) | ||
} | ||
} | ||
|
||
@Composable | ||
@PreviewLightDark | ||
private fun TemplateButtonPreview() { | ||
AppTheme { | ||
TemplateButton("Button", {}) | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
core/ui/src/main/kotlin/nl/q42/template/ui/theme/AppColorTokens.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,11 @@ | ||
package nl.q42.template.ui.theme | ||
|
||
import androidx.compose.ui.graphics.Color | ||
|
||
interface AppColorTokens { | ||
val buttonText: Color | ||
val accent: Color | ||
val textPrimary: Color | ||
val surface: Color | ||
val error: Color | ||
} |
11 changes: 11 additions & 0 deletions
11
core/ui/src/main/kotlin/nl/q42/template/ui/theme/AppColorTokensDark.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,11 @@ | ||
package nl.q42.template.ui.theme | ||
|
||
import androidx.compose.ui.graphics.Color | ||
|
||
object AppColorTokensDark: AppColorTokens { | ||
override val buttonText: Color = White | ||
override val accent: Color = PurpleGrey80 | ||
override val textPrimary = White | ||
override val surface = White | ||
override val error = Pink80 | ||
} |
11 changes: 11 additions & 0 deletions
11
core/ui/src/main/kotlin/nl/q42/template/ui/theme/AppColorTokensLight.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,11 @@ | ||
package nl.q42.template.ui.theme | ||
|
||
import androidx.compose.ui.graphics.Color | ||
|
||
object AppColorTokensLight : AppColorTokens { | ||
override val buttonText: Color = White | ||
override val accent: Color = Purple40 | ||
override val textPrimary = Black | ||
override val surface: Color = White | ||
override val error: Color = Red80 | ||
} |
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
10 changes: 10 additions & 0 deletions
10
core/ui/src/main/kotlin/nl/q42/template/ui/theme/Dimens.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,10 @@ | ||
package nl.q42.template.ui.theme | ||
|
||
import androidx.compose.ui.unit.dp | ||
|
||
object Dimens { | ||
object Containers { | ||
val cornerRadius = 8.dp | ||
val cornerRadiusLarge = 16.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
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