fix: remove noScale arg

This commit is contained in:
Stephen Zhou
2025-01-09 18:34:39 +08:00
parent 9745f4d9d0
commit ca4d3ea8b4
+2 -9
View File
@@ -300,7 +300,6 @@ const MediaImpl: FC<MediaProps> = ({
width={Number.parseInt(props.width as string)}
height={Number.parseInt(props.height as string)}
containerWidth={containerWidth}
noScale={inline}
fitContent={fitContent}
>
<div
@@ -360,7 +359,6 @@ const AspectRatio = ({
containerWidth,
children,
style,
noScale,
fitContent,
...props
}: {
@@ -369,19 +367,14 @@ const AspectRatio = ({
containerWidth?: number
children: React.ReactNode
style?: React.CSSProperties
/**
* Keep the content size for inline image usage
*/
noScale?: boolean
/**
* If `fit` is true, the content width may be increased to fit the container width
*/
fitContent?: boolean
[key: string]: any
}) => {
const scaleFactor = noScale
? 1
: containerWidth && width
const scaleFactor =
containerWidth && width
? fitContent
? containerWidth / width
: Math.min(1, containerWidth / width)