mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
feat(ui): portainer base component css change [EE-3381] (#7115)
This commit is contained in:
parent
825269c119
commit
f78a6568a6
70 changed files with 999 additions and 1596 deletions
|
@ -1,8 +1,14 @@
|
|||
import { PropsWithChildren } from 'react';
|
||||
import { Menu, MenuButton, MenuList, MenuLink } from '@reach/menu-button';
|
||||
import clsx from 'clsx';
|
||||
import { User, ChevronDown } from 'react-feather';
|
||||
|
||||
import { useUser } from '@/portainer/hooks/useUser';
|
||||
|
||||
import { Link } from '@@/Link';
|
||||
|
||||
import { useHeaderContext } from './HeaderContainer';
|
||||
import styles from './HeaderTitle.module.css';
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
|
@ -16,12 +22,25 @@ export function HeaderTitle({ title, children }: PropsWithChildren<Props>) {
|
|||
<div className="page white-space-normal">
|
||||
{title}
|
||||
<span className="header_title_content">{children}</span>
|
||||
{user && !window.ddExtension && (
|
||||
<span className="pull-right user-box">
|
||||
<i className="fa fa-user-circle" aria-hidden="true" />
|
||||
{user.Username}
|
||||
</span>
|
||||
)}
|
||||
<Menu>
|
||||
<MenuButton className={clsx('pull-right', styles.menuButton)}>
|
||||
<User className="feather" />
|
||||
{user && <span>{user.Username}</span>}
|
||||
<ChevronDown className="feather" />
|
||||
</MenuButton>
|
||||
<MenuList className={styles.menuList}>
|
||||
<MenuLink
|
||||
className={styles.menuLink}
|
||||
as={Link}
|
||||
to="portainer.account"
|
||||
>
|
||||
My account
|
||||
</MenuLink>
|
||||
<MenuLink className={styles.menuLink} as={Link} to="portainer.logout">
|
||||
Log out
|
||||
</MenuLink>
|
||||
</MenuList>
|
||||
</Menu>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue