styling
This commit is contained in:
@@ -7,6 +7,7 @@ interface GlitchAvatarProps {
|
|||||||
glitchSrc?: string;
|
glitchSrc?: string;
|
||||||
size?: number;
|
size?: number;
|
||||||
radius?: string | number;
|
radius?: string | number;
|
||||||
|
withBorder?: boolean;
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ const GlitchAvatar = ({
|
|||||||
glitchSrc,
|
glitchSrc,
|
||||||
size = 35,
|
size = 35,
|
||||||
radius = "md",
|
radius = "md",
|
||||||
|
withBorder = true,
|
||||||
children,
|
children,
|
||||||
}: GlitchAvatarProps) => {
|
}: GlitchAvatarProps) => {
|
||||||
const [showGlitch, setShowGlitch] = useState(false);
|
const [showGlitch, setShowGlitch] = useState(false);
|
||||||
@@ -89,7 +91,9 @@ const GlitchAvatar = ({
|
|||||||
position: "relative",
|
position: "relative",
|
||||||
width: "fit-content",
|
width: "fit-content",
|
||||||
padding: FRAME_PADDING,
|
padding: FRAME_PADDING,
|
||||||
border: "1px solid var(--mantine-color-default-border)",
|
border: withBorder
|
||||||
|
? "1px solid var(--mantine-color-default-border)"
|
||||||
|
: "1px solid transparent",
|
||||||
borderRadius: `calc(${innerRadius} + ${FRAME_PADDING}px)`,
|
borderRadius: `calc(${innerRadius} + ${FRAME_PADDING}px)`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ const Layout: React.FC<PropsWithChildren> = ({ children }) => {
|
|||||||
>
|
>
|
||||||
<Paper
|
<Paper
|
||||||
shadow='md'
|
shadow='md'
|
||||||
withBorder
|
|
||||||
p='md'
|
p='md'
|
||||||
w='100%'
|
w='100%'
|
||||||
maw='375px'
|
maw='375px'
|
||||||
@@ -49,6 +48,7 @@ const Layout: React.FC<PropsWithChildren> = ({ children }) => {
|
|||||||
}
|
}
|
||||||
radius="md"
|
radius="md"
|
||||||
size={250}
|
size={250}
|
||||||
|
withBorder={false}
|
||||||
>
|
>
|
||||||
<TrophyIcon size={32} />
|
<TrophyIcon size={32} />
|
||||||
</GlitchAvatar>
|
</GlitchAvatar>
|
||||||
|
|||||||
Reference in New Issue
Block a user