mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +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,4 +1,5 @@
|
|||
import { useRouter } from '@uirouter/react';
|
||||
import { RefreshCw } from 'react-feather';
|
||||
|
||||
import { Button } from '../buttons';
|
||||
|
||||
|
@ -11,12 +12,25 @@ import styles from './PageHeader.module.css';
|
|||
|
||||
interface Props {
|
||||
reload?: boolean;
|
||||
loading?: boolean;
|
||||
onReload?(): Promise<void> | void;
|
||||
breadcrumbs?: Crumb[];
|
||||
title: string;
|
||||
}
|
||||
|
||||
export function PageHeader({ title, breadcrumbs = [], reload }: Props) {
|
||||
export function PageHeader({
|
||||
title,
|
||||
breadcrumbs = [],
|
||||
reload,
|
||||
loading,
|
||||
onReload,
|
||||
}: Props) {
|
||||
const router = useRouter();
|
||||
|
||||
function onClickedRefresh() {
|
||||
return onReload ? onReload() : router.stateService.reload();
|
||||
}
|
||||
|
||||
return (
|
||||
<HeaderContainer>
|
||||
<HeaderTitle title={title}>
|
||||
|
@ -24,10 +38,11 @@ export function PageHeader({ title, breadcrumbs = [], reload }: Props) {
|
|||
<Button
|
||||
color="link"
|
||||
size="medium"
|
||||
onClick={() => router.stateService.reload()}
|
||||
onClick={onClickedRefresh}
|
||||
className={styles.reloadButton}
|
||||
disabled={loading}
|
||||
>
|
||||
<i className="fa fa-sync" aria-hidden="true" />
|
||||
<RefreshCw className="feather" />
|
||||
</Button>
|
||||
)}
|
||||
</HeaderTitle>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue