Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(CommonProps - TypeScript): remove dangerouslySetInnerHTML from types #6002

Merged
merged 3 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/MigrationGuide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion packages/main/src/types/CommonProps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { CSSProperties, HTMLAttributes } from 'react';

export interface CommonProps<T = HTMLElement> extends HTMLAttributes<T> {
export interface CommonProps<T = HTMLElement> extends Omit<HTMLAttributes<T>, '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.
Expand Down
Loading