diff --git a/package.json b/package.json index e8fc0d58..b839e0f9 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "import": "./lib/index.es.min.js", "require": "./lib/index.umd.min.js" }, + "./global.css": "./lib/global.css", "./hyperparam.css": "./lib/hyperparam.css" }, "bin": { @@ -29,7 +30,7 @@ ], "scripts": { "build:types": "tsc -b", - "build:lib": "vite build -c vite.lib.config.ts", + "build:lib": "vite build -c vite.lib.config.ts && cp src/styles/global.css lib/global.css", "build:app": "vite build", "build": "run-s build:lib build:types build:app", "coverage": "vitest run --coverage --coverage.include=src --coverage.include=bin", diff --git a/src/app.tsx b/src/app.tsx index 40aba716..62317ed3 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -1,8 +1,7 @@ -import 'hightable/src/HighTable.css' import { StrictMode } from 'react' import { createRoot } from 'react-dom/client' import App from './components/App.js' -import './styles/app.css' +import './styles/global.css' const root = document.getElementById('app') if (!root) throw new Error('missing root element') diff --git a/src/components/Breadcrumb.tsx b/src/components/Breadcrumb.tsx index 9f264788..55756ff4 100644 --- a/src/components/Breadcrumb.tsx +++ b/src/components/Breadcrumb.tsx @@ -1,6 +1,8 @@ import type { ReactNode } from 'react' import { useConfig } from '../hooks/useConfig.js' import type { Source } from '../lib/sources/types.js' +import { cn } from '../lib/utils.js' +import styles from '../styles/Breadcrumb.module.css' interface BreadcrumbProps { source: Source, @@ -11,10 +13,10 @@ interface BreadcrumbProps { * Breadcrumb navigation */ export default function Breadcrumb({ source, children }: BreadcrumbProps) { - const { routes } = useConfig() + const { routes, customClass } = useConfig() - return