1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-20 14:54:15 +01:00

Merge remote-tracking branch 'origin/product_store' into product_store-inte

This commit is contained in:
vincent 2022-08-04 09:51:41 +02:00
commit ac46314532
3 changed files with 13 additions and 2 deletions

View File

@ -22,7 +22,7 @@ interface FormImageUploadProps<TFieldValues> extends FormComponent<TFieldValues>
setValue: UseFormSetValue<TFieldValues>,
defaultImage?: ImageType,
accept?: string,
size?: 'small' | 'large'
size?: 'small' | 'medium' | 'large'
mainOption?: boolean,
onFileChange?: (value: ImageType) => void,
onFileRemove?: () => void,

View File

@ -20,7 +20,14 @@
width: 8rem;
height: 8rem;
}
&--large {}
&--medium {
width: 20rem;
height: 20rem;
}
&--large {
width: 40rem;
height: 40rem;
}
img {
width: 100%;

View File

@ -49,6 +49,10 @@ class ProductImageUploader < CarrierWave::Uploader::Base
process resize_to_fit: [700, 400]
end
version :small do
process resize_to_fit: [400, 250]
end
# Add a white list of extensions which are allowed to be uploaded.
# For images you might use something like this:
def extension_whitelist