Fix user menu styles
This commit is contained in:
parent
d6567658c0
commit
97ab7ee2c0
3 changed files with 10 additions and 4 deletions
|
@ -16,7 +16,7 @@
|
|||
}
|
||||
|
||||
.menuItem > * {
|
||||
margin-right: 10px;
|
||||
margin: 0 10px 0 0;
|
||||
}
|
||||
|
||||
.menuItem > :last-child {
|
||||
|
|
|
@ -10,6 +10,7 @@ import { ReactComponent as LoginIcon } from "./icons/Login.svg";
|
|||
import { ReactComponent as LogoutIcon } from "./icons/Logout.svg";
|
||||
import styles from "./UserMenu.module.css";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { Body } from "./typography/Typography";
|
||||
|
||||
export function UserMenu({
|
||||
disableLogout,
|
||||
|
@ -83,9 +84,9 @@ export function UserMenu({
|
|||
{(props) => (
|
||||
<Menu {...props} label="User menu" onAction={onAction}>
|
||||
{items.map(({ key, icon: Icon, label }) => (
|
||||
<Item key={key} textValue={label}>
|
||||
<Icon />
|
||||
<span>{label}</span>
|
||||
<Item key={key} textValue={label} className={styles.menuItem}>
|
||||
<Icon width={24} height={24} className={styles.menuIcon} />
|
||||
<Body overflowEllipsis>{label}</Body>
|
||||
</Item>
|
||||
))}
|
||||
</Menu>
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
.menuIcon {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.userButton svg * {
|
||||
fill: var(--textColor1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue