-
I tried to extend the JSX HTMLAttributes so that I can edit the This is far from ideal since I'd prefer to be able to do something like this, which is much more simple: import '@builder.io/mitosis/jsx-runtime'
import { JSX as MitosisJSX } from '@builder.io/mitosis/jsx-runtime'
type TwStyle = {
[key: string]: string | number | TwStyle
}
declare module '@builder.io/mitosis/jsx-runtime' {
namespace JSX {
type CSS =
| (Partial<CSSStyleDeclaration> & {
[key: string]: Partial<CSSStyleDeclaration> | string
})
| TwStyle
| Record<string, unknown>
interface HTMLAttributes<T>
extends MitosisJSX.AriaAttributes,
MitosisJSX.DOMAttributes<T> {
css?: CSS | { [key: string]: CSS | undefined }
}
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
We currently augment it this way:
Are you not able to augment the JSX attribute types this way? |
Beta Was this translation helpful? Give feedback.
We currently augment it this way:
tsconfig
here: https://github.com/BuilderIO/builder/blob/9f410d20609763de6dca469ad36d871874c84500/packages/sdks/tsconfig.json#L17Are you not able to augment the JSX attribute types this way?