Unverified Commit a024b831 authored by Tiago Evangelista Pinto's avatar Tiago Evangelista Pinto Committed by GitHub
Browse files

fix: Fix object-fit for image element in Avatar component (#335)

parent a9cefbb7
......@@ -8,6 +8,7 @@ export function Avatar({
title,
size = 'x36',
rounded = false,
objectFit = false,
url,
...props
}) {
......@@ -20,6 +21,7 @@ export function Avatar({
const innerClass = [
'rcx-avatar__element',
rounded && 'rcx-avatar__element--rounded',
objectFit && 'rcx-avatar__element--object-fit',
size && `rcx-avatar--${size}`,
]
.filter(Boolean)
......
......@@ -19,6 +19,10 @@ $sizes: 16, 18, 20, 24, 28, 32, 36, 40, 48, 124, 200, 332;
&--rounded {
border-radius: 100%;
}
&--object-fit {
object-fit: contain;
}
}
&-stack {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment