Optimize code

This commit is contained in:
2024-01-03 15:16:48 +08:00
parent d67aea2895
commit bcd7b761ac
10 changed files with 609 additions and 593 deletions

View File

@@ -7,20 +7,21 @@ interface FitFullscreenProps
backgroundColor?: string
}
const FitFullscreen = forwardRef<HTMLDivElement, FitFullscreenProps>((props, ref) => {
const { zIndex, backgroundColor, className, style, ..._props } = props
return (
<div
className={`fit-fullscreen${className ? ` ${className}` : ''}`}
style={{
zIndex,
backgroundColor,
...style
}}
ref={ref}
{..._props}
/>
)
})
const FitFullscreen = forwardRef<HTMLDivElement, FitFullscreenProps>(
({ zIndex, backgroundColor, className, style, ...props }, ref) => {
return (
<div
className={`fit-fullscreen${className ? ` ${className}` : ''}`}
style={{
zIndex,
backgroundColor,
...style
}}
ref={ref}
{...props}
/>
)
}
)
export default FitFullscreen