diff --git a/docs/MigrationGuide.mdx b/docs/MigrationGuide.mdx index ad10f611f5f..30df33c6563 100644 --- a/docs/MigrationGuide.mdx +++ b/docs/MigrationGuide.mdx @@ -38,6 +38,11 @@ function MyRootComponent() { } ``` +### Changes Exclusive to TypeScript + +- Removed `dangerouslySetInnerHTML` from general prop types since it was never intended to be used with our library. + If you've previously used this prop and the component didn't change with the update, then it might still work, but you'll probably need to suppress the TypeScript error. + ### Scrollbar Styling Starting with v2, the `ThemeProvider` will apply the Fiori styles to all scrollbars on the page. diff --git a/packages/main/src/types/CommonProps.ts b/packages/main/src/types/CommonProps.ts index f2f2cf37732..605bf1b6963 100644 --- a/packages/main/src/types/CommonProps.ts +++ b/packages/main/src/types/CommonProps.ts @@ -1,6 +1,6 @@ import type { CSSProperties, HTMLAttributes } from 'react'; -export interface CommonProps extends HTMLAttributes { +export interface CommonProps extends Omit, 'dangerouslySetInnerHTML'> { /** * Element style which will be appended to the most outer element of a component. * Use this prop carefully, some css properties might break the component.