From 1424f7ef4f01bdea56d2eefd4890b8bee10eae2c Mon Sep 17 00:00:00 2001 From: Alexander Popoff Date: Sun, 11 Feb 2024 14:09:52 +0400 Subject: [PATCH] `CardOwnProps` inherits `PaperOwnProps` --- buildSrc/src/main/kotlin/karakum/mui/Converter.kt | 3 +++ buildSrc/src/main/kotlin/karakum/mui/KotlinType.kt | 2 +- mui-kotlin/src/jsMain/kotlin/mui/material/Card.kt | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/kotlin/karakum/mui/Converter.kt b/buildSrc/src/main/kotlin/karakum/mui/Converter.kt index 7bd4938be..bbdc49f67 100644 --- a/buildSrc/src/main/kotlin/karakum/mui/Converter.kt +++ b/buildSrc/src/main/kotlin/karakum/mui/Converter.kt @@ -757,6 +757,9 @@ private fun MutableList.tryToAddInheritanceInterfaces( if (propsName == "CardActionAreaOwnProps") this += "ButtonBaseProps" + if (propsName == "CardOwnProps") + this += "PaperOwnProps" + if (propsName == "CardHeaderOwnProps") this += INTRINSIC_TYPE_MAP.getValue("div") diff --git a/buildSrc/src/main/kotlin/karakum/mui/KotlinType.kt b/buildSrc/src/main/kotlin/karakum/mui/KotlinType.kt index f28fdcd12..66539dd3e 100644 --- a/buildSrc/src/main/kotlin/karakum/mui/KotlinType.kt +++ b/buildSrc/src/main/kotlin/karakum/mui/KotlinType.kt @@ -239,7 +239,7 @@ private val STANDARD_TYPE_MAP = mapOf( "Any /* = {}>(externalProps?: ExternalProps) => UseMenuButtonRootSlotProps */", "StateChangeCallback" to "Any /* StateChangeCallback */", - "PopupProps['anchorEl']" to "Any /* PopupProps['anchorEl'] */", + "PopupProps['anchor']" to "Any /* PopupProps['anchor'] */", ) internal fun kotlinType( diff --git a/mui-kotlin/src/jsMain/kotlin/mui/material/Card.kt b/mui-kotlin/src/jsMain/kotlin/mui/material/Card.kt index dd34b6674..54d3a3313 100644 --- a/mui-kotlin/src/jsMain/kotlin/mui/material/Card.kt +++ b/mui-kotlin/src/jsMain/kotlin/mui/material/Card.kt @@ -16,7 +16,9 @@ external interface CardProps : react.dom.html.HTMLAttributes, mui.types.PropsWithComponent -external interface CardOwnProps : mui.system.PropsWithSx { +external interface CardOwnProps : + mui.system.PropsWithSx, + PaperOwnProps { /** * Override or extend the styles applied to the component. */