feat(02-03): install Schedule-X stack + CSS token layer + main.tsx imports
- Install @schedule-x/{calendar,react,theme-default,event-modal,events-service}@4.x
- Install temporal-polyfill@0.3.2 and lucide-react@1.17.0
- Create src/styles/tokens.css: all color/spacing/typography/breakpoint tokens
plus --sx-color-* Schedule-X overrides mapped to project tokens
- Create src/styles/tokens.ts: TypeScript mirror of token values for inline styles
- Create src/styles/index.css: imports tokens.css + minimal global reset
- Update main.tsx: Temporal polyfill first, then SX theme CSS, then styles/index.css
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
// IMPORTANT — import order is load-bearing:
|
||||
// 1. temporal-polyfill/global must register Temporal on globalThis BEFORE any
|
||||
// Schedule-X code runs (Schedule-X v4 uses Temporal objects at module init).
|
||||
// 2. Schedule-X theme-default CSS must be imported BEFORE tokens.css so that
|
||||
// the project's --sx-color-* overrides in tokens.css win the cascade.
|
||||
// 3. styles/index.css imports tokens.css which carries the --sx-color-* overrides.
|
||||
import 'temporal-polyfill/global'
|
||||
import '@schedule-x/theme-default/dist/index.css'
|
||||
import './styles/index.css'
|
||||
|
||||
import React from 'react'
|
||||
import ReactDOM from 'react-dom/client'
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
||||
|
||||
Reference in New Issue
Block a user