mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-02-20 00:33:07 +01:00
feat(analytics-docs): Add highlighting on window open
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Analytics docs</title>
|
||||
<title>Analytics events docs</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style>
|
||||
:root {
|
||||
|
||||
@@ -191,6 +191,8 @@ export const App = ({ theme }: AppProps) => {
|
||||
if (!el) return false;
|
||||
el.scrollIntoView({ block: 'start', behavior: 'instant' });
|
||||
window.scrollBy(0, -(HEADER_HEIGHT + 20));
|
||||
el.classList.add('highlighted');
|
||||
setTimeout(() => el.classList.remove('highlighted'), HIGHLIGHT_DURATION_MS);
|
||||
|
||||
return true;
|
||||
}, []);
|
||||
|
||||
@@ -38,7 +38,7 @@ export const updateUrl = (
|
||||
const search = params.toString();
|
||||
const url = search ? `${window.location.pathname}?${search}` : window.location.pathname;
|
||||
|
||||
const {hash} = window.location;
|
||||
const { hash } = window.location;
|
||||
|
||||
window.history.replaceState(null, '', `${url}${hash}`);
|
||||
};
|
||||
|
||||
@@ -78,7 +78,7 @@ export const Dropdown = forwardRef(
|
||||
intent="neutral"
|
||||
priority="secondary"
|
||||
icon={iconName}
|
||||
size={iconSize as ButtonSize}
|
||||
size={iconSize}
|
||||
tabIndex={-1}
|
||||
isDisabled={isDisabled}
|
||||
isLoading={isLoading}
|
||||
|
||||
Reference in New Issue
Block a user