This commit is contained in:
Michael Telatynski
2025-05-08 12:43:50 +01:00
parent 6e7abc6c5f
commit a111937d00
6 changed files with 38 additions and 8 deletions
+2 -1
View File
@@ -6,7 +6,8 @@
"main": "lib/index.js",
"scripts": {
"prepare": "vite build",
"lint:ts": "tsc --noEmit",
"lint:types": "tsc --noEmit",
"lint:codestyle": "echo 'handled by lint:eslint'",
"test": "echo no tests yet"
},
"devDependencies": {
+4 -4
View File
@@ -16,11 +16,11 @@ import { theme } from "./theme";
import Logo from "./Logo.tsx";
const Root = styled.nav`
background-color: ${({ theme }) => theme.compound.color.bgCanvasDefault};
border-bottom: ${({ theme }) => theme.navbar.border};
height: ${({ theme }) => theme.navbar.height};
background-color: ${({ theme }): string => theme.compound.color.bgCanvasDefault};
border-bottom: ${({ theme }): string => theme.navbar.border};
height: ${({ theme }): string => theme.navbar.height};
display: grid;
grid-template-columns: ${({ theme }) => `${theme.navbar.triggerWidth} auto`};
grid-template-columns: ${({ theme }): string => `${theme.navbar.triggerWidth} auto`};
gap: 24px;
`;
+1 -1
View File
@@ -14,7 +14,7 @@ const Anchor = styled.a`
`;
const Image = styled.img`
height: ${({ theme }) => theme.navbar.logoHeight};
height: ${({ theme }): string => theme.navbar.logoHeight};
align-self: center;
`;
+1 -1
View File
@@ -39,7 +39,7 @@ const SidebarHeading = styled.div`
const Launcher = styled.button`
align-items: center;
border: none;
color: ${({ theme }) => theme.compound.color.textPrimary};
color: ${({ theme }): string => theme.compound.color.textPrimary};
cursor: pointer;
display: flex;
@@ -13,7 +13,7 @@ import { StaticConfig } from "../config";
* Univention Central Navigation API
* https://docs.software-univention.de/nubus-kubernetes-customization/1.x/en/api/central-navigation.html
*/
export const UniventionCentralNavigation = z.object({
const UniventionCentralNavigation = z.object({
categories: z.array(
z.object({
identifier: z.string(),
+29
View File
@@ -14,6 +14,35 @@ const iconOnSolidPrimary = "var(--cpd-color-icon-on-solid-primary)";
const bodyMdSemibold = "var(--cpd-font-body-md-semibold)";
declare module "styled-components" {
export interface DefaultTheme {
compound: {
color: {
bgCanvasDefault: string;
textActionAccent: string;
textPrimary: string;
iconOnSolidPrimary: string;
};
font: {
bodyMdSemibold: string;
};
};
color: {
accent: string;
};
navbar: {
border: string;
boxShadow: string;
height: string;
triggerWidth: string;
logoHeight: string;
};
menu: {
width: string;
};
}
}
export const theme: DefaultTheme = {
compound: {
color: {