Updated tabs in visits section to be sticky

This commit is contained in:
Alejandro Celaya 2020-12-12 21:05:54 +01:00
parent c74355e363
commit 6090f97347
6 changed files with 12 additions and 6 deletions

View file

@ -24,7 +24,7 @@ export const EditServer = (ServerError: FC) => withSelectedServer<EditServerProp
return (
<NoMenuLayout>
<ServerForm
title={<h5 className="mb-0">Edit "{selectedServer.name}"</h5>}
title={<h5 className="mb-0">Edit &quot;{selectedServer.name}&quot;</h5>}
initialValues={selectedServer}
onSubmit={handleSubmit}
>

View file

@ -9,9 +9,9 @@ import { ShortUrlsTableProps } from '../short-urls/ShortUrlsTable';
import { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';
import { CreateShortUrlProps } from '../short-urls/CreateShortUrl';
import { VisitsOverview } from '../visits/reducers/visitsOverview';
import { Versions } from '../utils/helpers/version';
import { isServerWithId, SelectedServer } from './data';
import './Overview.scss';
import { Versions } from '../utils/helpers/version';
interface OverviewConnectProps {
shortUrlsList: ShortUrlsListState;

View file

@ -1,4 +1,4 @@
@import "../base";
@import '../base';
@mixin sticky-cell() {
z-index: 1;

View file

@ -1,5 +1,11 @@
@import '../utils/base';
.visits-stats__nav {
position: sticky !important;
top: $headerHeight - 1px;
z-index: 2;
}
.visits-stats__nav-link {
border-radius: 0 !important;
padding-bottom: calc(.5rem - 3px) !important;

View file

@ -116,8 +116,8 @@ const VisitsStats: FC<VisitsStatsProps> = ({ children, visitsInfo, getVisits, ca
return (
<>
<Card className="p-0 mt-4 overflow-hidden" body>
<Nav className="visits-stats__nav" pills justified>
<Card className="visits-stats__nav p-0 mt-4 overflow-hidden" body>
<Nav pills justified>
{Object.entries(sections).map(
([ section, { title, icon }]) => (
<NavLink

View file

@ -15,7 +15,7 @@
@media (min-width: $mdMin) {
&.visits-table__sticky {
top: $headerHeight - 2px;
top: $headerHeight + 40px;
}
}
}