mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-02-20 00:33:07 +01:00
feat(suite): styled theme added in docs
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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
11
packages/analytics-docs/styled.d.ts
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user