Skip to content

Commit f5f9101

Browse files
fix(CommonProps - TypeScript): remove dangerouslySetInnerHTML from types (#6002)
BREAKING CHANGE: `dangerouslySetInnerHTML` type has been removed --------- Co-authored-by: Marcus Notheis <[email protected]>
1 parent 9a611fd commit f5f9101

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

docs/MigrationGuide.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ function MyRootComponent() {
3838
}
3939
```
4040

41+
### Changes Exclusive to TypeScript
42+
43+
- Removed `dangerouslySetInnerHTML` from general prop types since it was never intended to be used with our library.
44+
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.
45+
4146
### Scrollbar Styling
4247

4348
Starting with v2, the `ThemeProvider` will apply the Fiori styles to all scrollbars on the page.

packages/main/src/types/CommonProps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { CSSProperties, HTMLAttributes } from 'react';
22

3-
export interface CommonProps<T = HTMLElement> extends HTMLAttributes<T> {
3+
export interface CommonProps<T = HTMLElement> extends Omit<HTMLAttributes<T>, 'dangerouslySetInnerHTML'> {
44
/**
55
* Element style which will be appended to the most outer element of a component.
66
* Use this prop carefully, some css properties might break the component.

0 commit comments

Comments
 (0)