mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 06:55:47 +01:00
improve avatar spacing
This commit is contained in:
@@ -46,10 +46,15 @@ const useAvatar = (person: Person): string | undefined => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const AvatarList = styled.span`
|
||||||
|
& > :not(:last-child) {
|
||||||
|
margin-right: 0.25em;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
const AvatarImage = styled(Image)`
|
const AvatarImage = styled(Image)`
|
||||||
width: 1em;
|
width: 1em;
|
||||||
height: 1em;
|
height: 1em;
|
||||||
margin-right: 0.25em;
|
|
||||||
vertical-align: middle !important;
|
vertical-align: middle !important;
|
||||||
margin-bottom: 0.2em;
|
margin-bottom: 0.2em;
|
||||||
border-radius: 0.25em;
|
border-radius: 0.25em;
|
||||||
@@ -112,9 +117,11 @@ const Persons: FC<PersonsProps> = ({ persons, label, displayTextOnly }) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{t(label)}{" "}
|
{t(label)}{" "}
|
||||||
{persons.map(p => (
|
<AvatarList>
|
||||||
<PersonAvatar person={p} avatar={avatarFactory(p)} />
|
{persons.map(p => (
|
||||||
))}
|
<PersonAvatar person={p} avatar={avatarFactory(p)} />
|
||||||
|
))}
|
||||||
|
</AvatarList>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@@ -148,11 +155,7 @@ const ChangesetAuthor: FC<Props> = ({ changeset }) => {
|
|||||||
const authorLine = [];
|
const authorLine = [];
|
||||||
if (changeset.author) {
|
if (changeset.author) {
|
||||||
authorLine.push(
|
authorLine.push(
|
||||||
<Persons
|
<Persons persons={[changeset.author]} label={"changesets.authors.authoredBy"} displayTextOnly={true} />
|
||||||
persons={[changeset.author]}
|
|
||||||
label={"changesets.authors.authoredBy"}
|
|
||||||
displayTextOnly={true}
|
|
||||||
/>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user