feat: improve consistency and design (#1867)
Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
This commit is contained in:
1 parent
6a9b65f219
commit
5f36d8b125
21 files changed
+216
-99
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import type { MantineSize } from "@mantine/core";
|
||||
import type { MantineRadius, MantineSize } from "@mantine/core";
|
||||
import { Avatar } from "@mantine/core";
|
||||
|
||||
import type { IntegrationKind } from "@homarr/definitions";
|
||||
@@ -7,13 +7,14 @@ import { getIconUrl } from "@homarr/definitions";
|
||||
interface IntegrationAvatarProps {
|
||||
size: MantineSize;
|
||||
kind: IntegrationKind | null;
|
||||
radius?: MantineRadius;
|
||||
}
|
||||
|
||||
export const IntegrationAvatar = ({ kind, size }: IntegrationAvatarProps) => {
|
||||
export const IntegrationAvatar = ({ kind, size, radius }: IntegrationAvatarProps) => {
|
||||
const url = kind ? getIconUrl(kind) : null;
|
||||
if (!url) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return <Avatar size={size} src={url} />;
|
||||
return <Avatar size={size} src={url} radius={radius} styles={{ image: { objectFit: "contain" } }} />;
|
||||
};
|
||||
Reference in new issue
Block a user