MCPcopy Create free account
hub / github.com/TanStack/devtools / createA11yPanelStyles

Function createA11yPanelStyles

packages/devtools-a11y/src/core/styles/styles.ts:53–549  ·  view source on GitHub ↗
(theme: TanStackDevtoolsTheme)

Source from the content-addressed store, hash-verified

51const fontPx = (size: number) => `calc(${size}px * ${FONT_SCALE})`
52
53function createA11yPanelStyles(theme: TanStackDevtoolsTheme) {
54 const t = (light: string, dark: string) => (theme === 'light' ? light : dark)
55
56 const bg = t('#f9fafb;', '#191c24')
57 const fg = t('#1e293b', '#e2e8f0')
58 const border = t('#e2e8f0', '#292e3d')
59 const muted = t('#64748b', '#94a3b8')
60 const muted2 = t('#727c8b', '#818386')
61
62 return {
63 colors: { bg, fg, border, muted, muted2, theme },
64
65 root: css`
66 height: 100%;
67 display: flex;
68 flex-direction: column;
69 overflow: hidden;
70 position: relative;
71 `,
72
73 header: css`
74 padding: 16px;
75 border-bottom: 1px solid ${border};
76 display: flex;
77 justify-content: space-between;
78 align-items: center;
79 flex-shrink: 0;
80 anchor-name: --a11y-toast-anchor;
81 `,
82 headerTitleRow: css`
83 display: flex;
84 align-items: center;
85 gap: 12px;
86 min-width: 0;
87 `,
88 headerTitle: css`
89 margin: 0;
90 font-size: ${fontPx(16)};
91 font-weight: 600;
92 `,
93 headerSub: css`
94 font-size: ${fontPx(12)};
95 color: ${muted};
96 white-space: nowrap;
97 `,
98 headerActions: css`
99 display: flex;
100 gap: 8px;
101 align-items: center;
102 flex-wrap: wrap;
103 justify-content: flex-end;
104 `,
105 primaryButton: css`
106 padding: 8px 16px;
107 color: #fff;
108 border-radius: 6px;
109 cursor: pointer;
110 font-weight: 500;

Callers 1

createStylesFunction · 0.85

Calls 2

fontPxFunction · 0.85
tFunction · 0.70

Tested by

no test coverage detected