F #3951: Fix images aspect ratio (#867)

This commit is contained in:
Sergio Betanzos authored and GitHub committed 2021-02-24 11:15:40 +01:00
1 parent f41ed0cda2
commit aa12d2e444
8 files changed
+14 -18

No files matched your search

@@ -19,29 +19,28 @@ export default makeStyles(theme => ({
})
}),
actionArea: {
height: '100%',
display: 'flex',
flexDirection: 'column',
minHeight: ({ minHeight = 140 }) => minHeight,
'&:disabled': {
filter: 'brightness(0.5)'
}
},
mediaActionArea: {
display: 'flex',
height: ({ mediaHeight = 140 }) => mediaHeight,
'&:hover': {
backgroundColor: theme.palette.secondary.contrastText,
'& $media': { filter: 'none' }
}
},
media: {
width: '100%',
paddingTop: '38.85%',
overflow: 'hidden',
position: 'relative',
'& img': {
width: '100%',
objectFit: 'cover',
maxHeight: ({ mediaHeight = 140 }) => mediaHeight
position: 'absolute',
top: '50%',
left: '50%',
transform: 'translate(-50%, -50%)'
},
flexGrow: 1,
transition: theme.transitions.create('filter', { duration: '0.2s' }),
filter: ({ isSelected, disableFilterImage }) => {
return disableFilterImage
@@ -52,8 +51,8 @@ export default makeStyles(theme => ({
}
},
headerRoot: {
alignItems: 'end',
alignSelf: 'stretch'
// align header icon to top
alignItems: 'end'
},
headerContent: { overflow: 'auto' },
headerAvatar: {
@@ -120,7 +120,7 @@ ListCards.propTypes = {
ListCards.defaultProps = {
list: [],
keyProp: 'id',
breakpoints: { xs: 12, sm: 4, md: 3, lg: 2 },
breakpoints: { xs: 12, sm: 6, md: 4, lg: 2 },
handleCreate: undefined,
ButtonCreateComponent: undefined,
CardComponent: null,
@@ -48,7 +48,6 @@ function ApplicationsInstances () {
cardsProps={({ value }) => ({
handleShow: () => setShowDialog(value)
})}
breakpoints={{ xs: 12, sm: 6, md: 4 }}
/>
)}
{showDialog !== false && (
@@ -51,7 +51,6 @@ function ApplicationsTemplates () {
handleDeploy: () => setShowDialog(value),
handleRemove: undefined
})}
breakpoints={{ xs: 12, sm: 6, md: 4 }}
/>
)}
{showDialog !== false && (
@@ -79,7 +79,6 @@ function Providers () {
}
]
})}
breakpoints={{ xs: 12, sm: 6, md: 4 }}
/>
)}
</Box>
@@ -59,7 +59,6 @@ const Provider = () => ({
handleClick: () => handleClick(value, isSelected)
}
}}
breakpoints={{ xs: 12, sm: 6, md: 4 }}
/>
)
}, [])
@@ -40,9 +40,11 @@ function ProvisionCreateForm () {
const onSubmit = formData => {
const { template, provider, configuration, inputs } = formData
const { name, description } = configuration
const provisionTemplateSelected = template?.[0] ?? {}
const providerName = provider?.[0]?.NAME
// clone object from redux store
const provisionTemplateSelected = JSON.parse(JSON.stringify(template?.[0] ?? {}))
// update provider name if changed during form
if (provisionTemplateSelected.defaults?.provision?.provider_name) {
set(provisionTemplateSelected, 'defaults.provision.provider_name', providerName)
@@ -85,7 +85,6 @@ function Provisions () {
}
]
})}
breakpoints={{ xs: 12, sm: 6, md: 4 }}
/>
)}
</Box>