mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 04:50:12 +02:00
Add image URL generation at runtime to allow for dynamic image sizes (#1439)
* add getImageUrl to domain endpoints * add new ItemImage component and hooks to generate image url * add configuration for image resolution based on types
This commit is contained in:
@@ -15,16 +15,7 @@ import { Icon } from '/@/shared/components/icon/icon';
|
||||
import { Skeleton } from '/@/shared/components/skeleton/skeleton';
|
||||
import { useInViewport } from '/@/shared/hooks/use-in-viewport';
|
||||
|
||||
interface ImageContainerProps extends HTMLAttributes<HTMLDivElement> {
|
||||
children: ReactNode;
|
||||
enableAnimation?: boolean;
|
||||
}
|
||||
|
||||
interface ImageLoaderProps {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
interface ImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, 'src'> {
|
||||
export interface ImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, 'src'> {
|
||||
containerClassName?: string;
|
||||
enableAnimation?: boolean;
|
||||
imageContainerProps?: Omit<ImageContainerProps, 'children'>;
|
||||
@@ -34,6 +25,15 @@ interface ImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, 'src'> {
|
||||
thumbHash?: string;
|
||||
}
|
||||
|
||||
interface ImageContainerProps extends HTMLAttributes<HTMLDivElement> {
|
||||
children: ReactNode;
|
||||
enableAnimation?: boolean;
|
||||
}
|
||||
|
||||
interface ImageLoaderProps {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
interface ImageUnloaderProps {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user