-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33643 from ruben-rebelo/ts-migration/HTMLEnginePr…
…ovider-component [TS migration] Migrate HTMLEngineProvider component
- Loading branch information
Showing
7 changed files
with
72 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react'; | ||
import type ChildrenProps from '@src/types/utils/ChildrenProps'; | ||
import BaseHTMLEngineProvider from './BaseHTMLEngineProvider'; | ||
|
||
function HTMLEngineProvider({children}: ChildrenProps) { | ||
return <BaseHTMLEngineProvider enableExperimentalBRCollapsing>{children}</BaseHTMLEngineProvider>; | ||
} | ||
|
||
HTMLEngineProvider.displayName = 'HTMLEngineProvider'; | ||
|
||
export default HTMLEngineProvider; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
import useWindowDimensions from '@hooks/useWindowDimensions'; | ||
import * as DeviceCapabilities from '@libs/DeviceCapabilities'; | ||
import type ChildrenProps from '@src/types/utils/ChildrenProps'; | ||
import BaseHTMLEngineProvider from './BaseHTMLEngineProvider'; | ||
|
||
function HTMLEngineProvider({children}: ChildrenProps) { | ||
const {isSmallScreenWidth} = useWindowDimensions(); | ||
|
||
return <BaseHTMLEngineProvider textSelectable={!DeviceCapabilities.canUseTouchScreen() || !isSmallScreenWidth}>{children}</BaseHTMLEngineProvider>; | ||
} | ||
|
||
HTMLEngineProvider.displayName = 'HTMLEngineProvider'; | ||
|
||
export default HTMLEngineProvider; |