Replace global scrollbars with themed overlay scroll areas
This commit is contained in:
1 parent
85c4c1863d
commit
8a05dfee58
7 files changed
+114
-78
No files matched your search
@@ -13,6 +13,7 @@ import { SettingsNav } from '@/app/(main)/settings/SettingsNav';
|
||||
import { WebsiteNav } from '@/app/(main)/websites/[websiteId]/WebsiteNav';
|
||||
import { IconLabel } from '@/components/common/IconLabel';
|
||||
import Link from '@/components/common/Link';
|
||||
import { OverlayScrollArea } from '@/components/common/OverlayScrollArea';
|
||||
import { useGlobalState, useMessages, useNavigation } from '@/components/hooks';
|
||||
import {
|
||||
Globe,
|
||||
@@ -103,7 +104,7 @@ export function SideNav(props: any) {
|
||||
<PanelButton />
|
||||
</Row>
|
||||
</Row>
|
||||
<Column flexGrow="1" minHeight="0" style={{ overflowY: 'auto', overflowX: 'hidden' }}>
|
||||
<OverlayScrollArea style={{ flexGrow: 1, minHeight: 0 }}>
|
||||
{websiteId ? (
|
||||
<WebsiteNav websiteId={websiteId} isCollapsed={isCollapsed} />
|
||||
) : pathname.includes('/settings') ? (
|
||||
@@ -147,7 +148,7 @@ export function SideNav(props: any) {
|
||||
})}
|
||||
</Column>
|
||||
)}
|
||||
</Column>
|
||||
</OverlayScrollArea>
|
||||
<Row
|
||||
paddingTop="2"
|
||||
width="100%"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Column, Grid, Row } from '@umami/react-zen';
|
||||
import { WebsiteExpandedMenu } from '@/app/(main)/websites/[websiteId]/WebsiteExpandedMenu';
|
||||
import { OverlayScrollArea } from '@/components/common/OverlayScrollArea';
|
||||
import { useMessages, useNavigation } from '@/components/hooks';
|
||||
import { MobileMenuButton } from '@/components/input/MobileMenuButton';
|
||||
import { MetricsExpandedTable } from '@/components/metrics/MetricsExpandedTable';
|
||||
@@ -40,9 +41,12 @@ export function WebsiteExpandedView({
|
||||
gap="6"
|
||||
border="right"
|
||||
paddingRight="3"
|
||||
overflow="auto"
|
||||
minHeight="0"
|
||||
overflow="hidden"
|
||||
>
|
||||
<WebsiteExpandedMenu excludedIds={excludedIds} />
|
||||
<OverlayScrollArea style={{ height: '100%' }}>
|
||||
<WebsiteExpandedMenu excludedIds={excludedIds} />
|
||||
</OverlayScrollArea>
|
||||
</Column>
|
||||
<Column id="metrics-expanded-table" overflow="hidden">
|
||||
<MetricsExpandedTable title={title} type={view} websiteId={websiteId} onClose={onClose} />
|
||||
|
||||
@@ -18,29 +18,6 @@ html[style*="padding-right"] {
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 15px;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
border: 7px solid rgba(0, 0, 0, 0);
|
||||
background-color: var(--border-default);
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border: 7px solid rgba(0, 0, 0, 0);
|
||||
background-color: var(--text-disabled);
|
||||
border-radius: var(--border-radius-full);
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
border: 4px solid rgba(0, 0, 0, 0);
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
/* Fix autofill background color to match theme */
|
||||
input:is(:-webkit-autofill, :autofill),
|
||||
input:is(:-webkit-autofill, :autofill):hover,
|
||||
|
||||
Reference in new issue
Block a user