Skip to content

Commit

Permalink
MUI Icons Material: All icons in single file
Browse files Browse the repository at this point in the history
  • Loading branch information
aerialist7 committed May 7, 2024
1 parent 916e234 commit 32d31fb
Show file tree
Hide file tree
Showing 10,613 changed files with 10,632 additions and 74,362 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
30 changes: 15 additions & 15 deletions buildSrc/src/main/kotlin/karakum/mui/Icons.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ internal data class IconConversionResult(

internal fun convertIcons(
definitionFile: File,
): Sequence<IconConversionResult> =
definitionFile.readText()
): Sequence<IconConversionResult> {
val body = definitionFile.readText()
.removeSuffix("\n")
.splitToSequence("\nexport const ")
.drop(1)
.map { it.removeSuffix(": SvgIconComponent;") }
.map { name ->
IconConversionResult(
name = name,
body = """
external val $name: SvgIconComponent
""".trimIndent(),
)
}
.plus(
IconConversionResult(
name = "SvgIconComponent",
body = "typealias SvgIconComponent = react.FC<mui.material.SvgIconProps>",
)
.map { name -> "external val $name: SvgIconComponent" }
.joinToString("\n")

return sequenceOf(
IconConversionResult(
name = "Icons",
body = body,
),
IconConversionResult(
name = "SvgIconComponent",
body = "typealias SvgIconComponent = react.FC<mui.material.SvgIconProps>",
)
)
}
7 changes: 0 additions & 7 deletions mui-icons-kotlin/src/jsMain/kotlin/mui/icons/material/Abc.kt

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 32d31fb

Please sign in to comment.