feat(suite): styled theme added in docs

This commit is contained in:
Jan Václavík
2026-02-09 08:21:10 +01:00
parent 9a9f7bd412
commit f9249658d3
4 changed files with 25 additions and 8 deletions

View File

@@ -4,6 +4,11 @@
<meta charset="UTF-8" />
<title>Analytics docs</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
:root {
color-scheme: light dark;
}
</style>
</head>
<body>
<div id="root"></div>

View File

@@ -1,15 +1,13 @@
import { DefaultTheme, createGlobalStyle } from 'styled-components';
import { typography } from '@trezor/theme';
import { fontFamilies, typography } from '@trezor/theme';
export const GlobalStyle = createGlobalStyle<{ theme: DefaultTheme }>`
input, textarea {
outline: none;
}
body, html {
background: ${({ theme }) => theme.backgroundSurfaceElevation0};
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
${typography.body}
@@ -20,6 +18,13 @@ export const GlobalStyle = createGlobalStyle<{ theme: DefaultTheme }>`
font-family: "TT Satoshi", -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
:root {
min-height: 100%;
color-scheme: dark;
--font-sans: ${fontFamilies.base};
}
* {
margin: 0;
@@ -34,8 +39,4 @@ export const GlobalStyle = createGlobalStyle<{ theme: DefaultTheme }>`
box-sizing: border-box;
}
:root {
color-scheme: dark;
}
`;

11
packages/analytics-docs/styled.d.ts vendored Normal file
View File

@@ -0,0 +1,11 @@
// import original module declarations
import 'styled-components';
import { SuiteThemeColors, ThemeVariant } from '@trezor/components';
import { BoxShadows, Colors } from '@trezor/theme';
declare module 'styled-components' {
export interface DefaultTheme extends SuiteThemeColors, Colors, BoxShadows {
variant: ThemeVariant;
}
}

View File

@@ -1,5 +1,5 @@
export { EventType } from './constants';
export { type AnalyticsSharedEvents } from './analyticsEvents';
export type { AttributeDef, EventDef, EventInstance } from './eventDefinition';
export type { AttributeDef, EventDef, EventInstance, AppVersion } from './eventDefinition';
export * as events from './events';