mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
### Why? Although the style applied to the shadow host is isolated, the element that attached the shadow host (i.e. `nextjs-portal`) is still affected by the parent's style (e.g. `body`). This may occur style conflicts like `display: flex`, with other children elements therefore give the shadow host an absolute position. Fixes #70675 Closes NDX-640 --------- Co-authored-by: samcx <[email protected]> Co-authored-by: devjiwonchoi <[email protected]>
19 lines
360 B
TypeScript
19 lines
360 B
TypeScript
import { ReactNode } from 'react'
|
|
export default function Root({ children }: { children: ReactNode }) {
|
|
return (
|
|
<html>
|
|
<body
|
|
style={{
|
|
margin: 0,
|
|
padding: 0,
|
|
width: 300,
|
|
display: 'flex',
|
|
justifyContent: 'space-between',
|
|
}}
|
|
>
|
|
{children}
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|