style-dictionary
style-dictionary copied to clipboard
Compose object imports
Issue #, if available: Selectively import on compose class was not available
Description of changes: Added a formatHelper for import option + added map function in the compose template
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
This is amazing! It's exactly what I miss to convert to Android Compose objects
Really need this. Is there a reason it was never merged?
+1 @martymiller
Ideally the imports should be automatically imported from the classes and functions used on whether the applied transforms actually need.
However, at the moment the current code hardcodes 2 imports
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.*
I think this change, although it won't reach the desired goal, it will improve the current code allowing to import more than the 2 hardcoded imports.
@dbanksdesign can we request an approve for this? in order to integrate this feature?
Really need this. Is there a reason it was never merged?
Not really, we are waiting for an approve