Closed citywalki closed 11 months ago
@file:JsModule("antd")
external object Layout: FC<LayoutProps> {
val Header: FC<HeaderProps>
val Content: FC<ContentProps>
val Footer: FC<FooterProps>
val Sider: FC<SiderProps>
}
@file:JsModule("antd") external object Layout: FC<LayoutProps> { val Header: FC<HeaderProps> val Content: FC<ContentProps> val Footer: FC<FooterProps> val Sider: FC<SiderProps> }
@turansky I tried it, the layout is fine, but adding the header has wrong.
Could you test following?
console.log(Layout)
console.log(Layout.Header)
Could you test following?
Layout {
// I don't know why `Header` works fine, it looks like props with broken nullability
Layout.Header {
}
}
@file:JsModule("antd") external object Layout: FC<LayoutProps> { val Header: FC<HeaderProps> val Content: FC<ContentProps> val Footer: FC<FooterProps> val Sider: FC<SiderProps> }
@turansky Sorry, I made a mistake, I used the interface. When I change it to object, everything is fine. thank you very much
@turansky Sorry, I have a new question to ask. Can we wrap this use kotlin?
I don't know solution for generic T
.
@citywalki Hi,I have the same problem as you. I just spent a day wrapper the DayJS library. I'm about to wrapper the Antd library. How's your progress? How about we wrapper together and contribute to Kotlin-wrappers?
@leerenbo sorry, I gave up use kotlin
in js:
in kotlin:
But I don't know how to use Header in kotlin,Is there any hint?? antd layout code layout doc