added modifier extentions
This commit is contained in:
parent
9bb48a63fa
commit
b76852720a
1 changed files with 42 additions and 0 deletions
|
@ -0,0 +1,42 @@
|
|||
package be.ugent.sel.studeez.common.ext
|
||||
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
||||
fun Modifier.textButton(): Modifier {
|
||||
return this.fillMaxWidth().padding(16.dp, 8.dp, 16.dp, 0.dp)
|
||||
}
|
||||
|
||||
fun Modifier.basicButton(): Modifier {
|
||||
return this.fillMaxWidth().padding(16.dp, 8.dp)
|
||||
}
|
||||
|
||||
fun Modifier.card(): Modifier {
|
||||
return this.padding(16.dp, 0.dp, 16.dp, 8.dp)
|
||||
}
|
||||
|
||||
fun Modifier.contextMenu(): Modifier {
|
||||
return this.wrapContentWidth()
|
||||
}
|
||||
|
||||
fun Modifier.dropdownSelector(): Modifier {
|
||||
return this.fillMaxWidth()
|
||||
}
|
||||
|
||||
fun Modifier.fieldModifier(): Modifier {
|
||||
return this.fillMaxWidth().padding(16.dp, 4.dp)
|
||||
}
|
||||
|
||||
fun Modifier.toolbarActions(): Modifier {
|
||||
return this.wrapContentSize(Alignment.TopEnd)
|
||||
}
|
||||
|
||||
fun Modifier.spacer(): Modifier {
|
||||
return this.fillMaxWidth().padding(12.dp)
|
||||
}
|
||||
|
||||
fun Modifier.smallSpacer(): Modifier {
|
||||
return this.fillMaxWidth().height(8.dp)
|
||||
}
|
Reference in a new issue