The classes-utility function just joins arbitrary Strings with classnames to one String. It takes care of adding aprropriate spaces and drops null values.
The name was meant to be short, but as it seems quite often it competes with some parameter named also classes, which is just passed through from higher call sites. This reads not nicely:
classes(classes, "... some local added classes", ...)
It might be better to add some suffix to express its functionality: Joining of different pieces of classnames, though joinClassNames or joinClasses?
joinClassNames(classes, "... some local added classes", ...)
We could mark the current function with @Deprecated("renamed to ``joinClassNames()``", ReplaceWith("joinClassNames(classes)")) in order to enable a smoother transition.
The
classes
-utility function just joins arbitraryString
s with classnames to oneString
. It takes care of adding aprropriate spaces and dropsnull
values.The name was meant to be short, but as it seems quite often it competes with some parameter named also
classes
, which is just passed through from higher call sites. This reads not nicely:It might be better to add some suffix to express its functionality: Joining of different pieces of classnames, though
joinClassNames
orjoinClasses
?We could mark the current function with
@Deprecated("renamed to ``joinClassNames()``", ReplaceWith("joinClassNames(classes)"))
in order to enable a smoother transition.