mirror of
https://github.com/ansible/awx.git
synced 2026-03-15 16:07:30 -02:30
Refactor breadcrumbs, tabs, routing.
* Cleanup previous params logic from Notificaitons list * Add shared breadcrumbs and tabs components * Structure Organization screens to render only cardBody content * Add styles * Fetch organization when location changes
This commit is contained in:
@@ -1,11 +1,37 @@
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Button } from '@patternfly/react-core';
|
||||
import { TimesIcon } from '@patternfly/react-icons';
|
||||
import Tooltip from '../Tooltip';
|
||||
import './tabs.scss';
|
||||
|
||||
const Tabs = ({ children, labelText }) => (
|
||||
<div className="pf-c-tabs" aria-label={labelText}>
|
||||
const Tabs = ({ children, labelText, closeButton }) => (
|
||||
<div
|
||||
aria-label={labelText}
|
||||
className="pf-c-tabs pf-u-flex-direction-row pf-u-justify-content-space-between"
|
||||
>
|
||||
<ul className="pf-c-tabs__list">
|
||||
{children}
|
||||
</ul>
|
||||
{closeButton
|
||||
&& (
|
||||
<div className="pf-u-align-self-center">
|
||||
<Tooltip
|
||||
message={closeButton.text}
|
||||
position="top"
|
||||
>
|
||||
<Link to={closeButton.link}>
|
||||
<Button
|
||||
variant="plain"
|
||||
aria-label={closeButton.text}
|
||||
>
|
||||
<TimesIcon />
|
||||
</Button>
|
||||
</Link>
|
||||
</Tooltip>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
</div>
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user