kristofdho
09/09/2017, 10:56 AMfun <T> box(all: T) = CssBox(all, all, all, all)
fun <T> box(vertical: T, horizontal: T) = CssBox(vertical, horizontal, vertical, horizontal)
fun <T> box(top: T, right: T, bottom: T, left: T) = CssBox(top, right, bottom, left)
data class CssBox<out T>(val top: T, val right: T, val bottom: T, val left: T)
I noticed in the 2 argument box that the naming of the arguments is wrong, when assuming the same behaviour as normal css it works, but when using named parameters horizontal
and vertical
should be switched.