Skip to content

Commit

Permalink
Move toKotlinPropertyName call to default param lambda (#17)
Browse files Browse the repository at this point in the history
Co-authored-by: Gabriel Souza <[email protected]>
  • Loading branch information
c5inco and DevSrSouza authored Dec 27, 2023
1 parent f12160b commit 8a145f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/br/com/devsrsouza/svg2compose/Svg2Compose.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ object Svg2Compose {
outputSourceDirectory: File,
vectorsDirectory: File,
type: VectorType = VectorType.SVG,
iconNameTransformer: IconNameTransformer = { it, _ -> it },
iconNameTransformer: IconNameTransformer = { it, _ -> it.toKotlinPropertyName() },
allAssetsPropertyName: String = "AllAssets",
generatePreview: Boolean = true,
): ParsingResult {
Expand Down Expand Up @@ -76,7 +76,7 @@ object Svg2Compose {
val icons: Map<VectorFile, Icon> = drawables.associate { (vectorFile, drawableFile) ->
vectorFile to Icon(
iconNameTransformer(
drawableFile.nameWithoutExtension.toKotlinPropertyName().trim(),
drawableFile.nameWithoutExtension.trim(),
groupName
),
drawableFile.name,
Expand Down

0 comments on commit 8a145f5

Please sign in to comment.