mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-07-18 16:43:56 -05:00
Fix log out button icon size
This commit is contained in:
parent
2e6acc90f5
commit
b558f1b76f
|
|
@ -114,13 +114,13 @@
|
|||
margin-inline-end: 0 !important;
|
||||
}
|
||||
|
||||
.small > .buttonIcon {
|
||||
.buttonIconSmall {
|
||||
min-width: 1rem;
|
||||
max-width: 1rem;
|
||||
margin-inline-end: var(--s-1);
|
||||
}
|
||||
|
||||
.miniscule > .buttonIcon {
|
||||
.buttonIconMiniscule {
|
||||
min-width: 0.857rem;
|
||||
max-width: 0.857rem;
|
||||
margin-inline-end: var(--s-1);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export function SendouButton({
|
|||
>
|
||||
{icon &&
|
||||
React.cloneElement(icon, {
|
||||
className: iconClassName(icon.props.className, children),
|
||||
className: iconClassName(icon.props.className, children, size),
|
||||
})}
|
||||
{children}
|
||||
</ReactAriaButton>
|
||||
|
|
@ -88,7 +88,7 @@ export function LinkButton({
|
|||
>
|
||||
{icon &&
|
||||
React.cloneElement(icon, {
|
||||
className: iconClassName(icon.props.className, children),
|
||||
className: iconClassName(icon.props.className, children, size),
|
||||
})}
|
||||
{children}
|
||||
</a>
|
||||
|
|
@ -105,7 +105,7 @@ export function LinkButton({
|
|||
>
|
||||
{icon &&
|
||||
React.cloneElement(icon, {
|
||||
className: iconClassName(icon.props.className, children),
|
||||
className: iconClassName(icon.props.className, children, size),
|
||||
})}
|
||||
{children}
|
||||
</Link>
|
||||
|
|
@ -155,8 +155,11 @@ function buttonClassName({
|
|||
function iconClassName(
|
||||
baseClassName: string | undefined,
|
||||
children: React.ReactNode,
|
||||
size: SendouButtonProps["size"],
|
||||
) {
|
||||
return clsx(baseClassName, styles.buttonIcon, {
|
||||
[styles.lonely]: !children,
|
||||
[styles.buttonIconSmall]: size === "small",
|
||||
[styles.buttonIconMiniscule]: size === "miniscule",
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user