mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-07-13 14:53:23 -05:00
No margin-right on button icon if no text
This commit is contained in:
parent
065c68e794
commit
6cd5225ceb
|
|
@ -47,7 +47,10 @@ export function Button(props: ButtonProps) {
|
|||
type={type}
|
||||
{...rest}
|
||||
>
|
||||
{icon && React.cloneElement(icon, { className: "button-icon" })}
|
||||
{icon &&
|
||||
React.cloneElement(icon, {
|
||||
className: clsx("button-icon", { lonely: !children }),
|
||||
})}
|
||||
{loading && loadingText ? loadingText : children}
|
||||
</button>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -186,11 +186,15 @@ a {
|
|||
opacity: 0.6;
|
||||
}
|
||||
|
||||
:is(button, .button) > .button-icon {
|
||||
.button-icon {
|
||||
width: 1.25rem;
|
||||
margin-inline-end: var(--s-1-5);
|
||||
}
|
||||
|
||||
.button-icon.lonely {
|
||||
margin-inline-end: 0;
|
||||
}
|
||||
|
||||
:is(button, .button).tiny > .button-icon {
|
||||
width: 1rem;
|
||||
margin-inline-end: var(--s-1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user