Space out AvatarStack
This commit is contained in:
@@ -19,7 +19,7 @@ export function AvatarStack({
|
|||||||
numPending?: number
|
numPending?: number
|
||||||
backgroundColor?: string
|
backgroundColor?: string
|
||||||
}) {
|
}) {
|
||||||
const halfSize = size / 2
|
const translation = size / 3 // overlap by 1/3
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const moderationOpts = useModerationOpts()
|
const moderationOpts = useModerationOpts()
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ export function AvatarStack({
|
|||||||
a.flex_row,
|
a.flex_row,
|
||||||
a.align_center,
|
a.align_center,
|
||||||
a.relative,
|
a.relative,
|
||||||
{width: size + (items.length - 1) * halfSize},
|
{width: size + (items.length - 1) * (size - translation)},
|
||||||
]}>
|
]}>
|
||||||
{items.map((item, i) => (
|
{items.map((item, i) => (
|
||||||
<View
|
<View
|
||||||
@@ -54,7 +54,7 @@ export function AvatarStack({
|
|||||||
{
|
{
|
||||||
width: size,
|
width: size,
|
||||||
height: size,
|
height: size,
|
||||||
left: i * -halfSize,
|
left: i * -translation,
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
borderColor: backgroundColor ?? t.atoms.bg.backgroundColor,
|
borderColor: backgroundColor ?? t.atoms.bg.backgroundColor,
|
||||||
borderRadius: 999,
|
borderRadius: 999,
|
||||||
|
|||||||
Reference in New Issue
Block a user