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:
Marliana Lara
2019-01-24 23:53:10 -05:00
parent dd522c240e
commit b820e411d3
18 changed files with 363 additions and 356 deletions

View File

@@ -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>
);