Skip to content

Instantly share code, notes, and snippets.

@cicerohellmann
Created April 29, 2021 12:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cicerohellmann/4d67109876a6077d35a9a730aab2cc28 to your computer and use it in GitHub Desktop.
Save cicerohellmann/4d67109876a6077d35a9a730aab2cc28 to your computer and use it in GitHub Desktop.
Several value grous and a way to implement them
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
class Dimens {
companion object {
val buttonHeight = 16.dp
}
}
class Padding {
companion object {
val base = 4.dp
val double = base * 2
val quadruple = double * 2
}
}
class LetterSpacing {
companion object {
val title = 0.25.sp
val button = 1.25.sp
}
}
class LineHeight {
companion object {
val title = 16.sp
val title2 = 23.sp
}
}
class FontSize {
companion object {
val title = 20.sp
val title2 = 18.sp
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment