This commit is contained in:
2023-11-02 18:29:13 +08:00
parent d708cf7906
commit a8167b0741
11 changed files with 119 additions and 38 deletions

View File

@@ -0,0 +1,12 @@
import React from 'react'
import '@/assets/css/components/common/card.scss'
interface CardProps
extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {}
const Card: React.FC<CardProps> = (props) => {
const { className, ..._props } = props
return <div className={`card-box${className ? ` ${className}` : ''}`} {..._props} />
}
export default Card

View File

@@ -9,14 +9,12 @@ interface FitCenterProps
const FitCenter: React.FC<FitCenterProps> = (props) => {
const { className, vertical, ..._props } = props
return (
<>
<div
className={`fit-center${className ? ` ${className}` : ''}${
vertical ? ' flex-vertical' : ' flex-horizontal'
}`}
{..._props}
></div>
</>
<div
className={`fit-center${className ? ` ${className}` : ''}${
vertical ? ' flex-vertical' : ' flex-horizontal'
}`}
{..._props}
/>
)
}

View File

@@ -10,20 +10,16 @@ interface FitFullscreenProps
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}
>
{props.children}
</div>
</>
<div
className={`fit-fullscreen${className ? ` ${className}` : ''}`}
style={{
zIndex,
backgroundColor,
...style
}}
ref={ref}
{..._props}
/>
)
})

View File

@@ -176,6 +176,7 @@ const HideScrollbar = forwardRef<HideScrollbarElement, HideScrollbarProps>((prop
scrollbarWidth,
animationTransitionTime,
autoHideWaitingTime,
children,
..._props
} = props
@@ -527,7 +528,7 @@ const HideScrollbar = forwardRef<HideScrollbarElement, HideScrollbarProps>((prop
style={{ minWidth, minHeight }}
data-refresh={refreshTime}
>
{props.children}
{children}
</div>
</div>
<div