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:
commit
ac46314532
@ -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,
|
||||
|
@ -20,7 +20,14 @@
|
||||
width: 8rem;
|
||||
height: 8rem;
|
||||
}
|
||||
&--large {}
|
||||
&--medium {
|
||||
width: 20rem;
|
||||
height: 20rem;
|
||||
}
|
||||
&--large {
|
||||
width: 40rem;
|
||||
height: 40rem;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user