Skip to content

Add @typestyles/react package with css prop and styled API (P3.25)#111

Merged
dbanksdesign merged 1 commit into
mainfrom
add-typestyles-react-p3-25
Jul 4, 2026
Merged

Add @typestyles/react package with css prop and styled API (P3.25)#111
dbanksdesign merged 1 commit into
mainfrom
add-typestyles-react-p3-25

Conversation

@charleswallace0826

Copy link
Copy Markdown
Collaborator

Summary

Implements P3.25 from IMPROVEMENTS.md — a new @typestyles/react package for teams migrating from Emotion/styled-components.

  • css prop — Maps inline CSSProperties to styles.hashClass via two paths:
    • Runtime: @typestyles/react/jsx-runtime + TypeStylesProvider and resolveCssPropClass
    • Build-time: @typestyles/react/babel plugin transforms static css={{…}} props to className
  • createStyled(styles) — Thin React wrapper over styles.component with ComponentVariants typing, variant prop splitting, and cx class merging
  • Monorepo integration — Package scaffold (README, CHANGELOG, changeset), root react script, IMPROVEMENTS checkbox marked complete

No CSS generation is duplicated — all styling delegates to existing typestyles APIs.

Test plan

  • pnpm install
  • pnpm --filter typestyles build && pnpm --filter @typestyles/eslint-plugin build
  • pnpm --filter @typestyles/react build
  • pnpm --filter @typestyles/react test
  • pnpm --filter @typestyles/react typecheck
  • pnpm --filter @typestyles/react lint

Made with Cursor

Introduces a new React integration package for teams migrating from Emotion/styled-components: runtime and build-time css prop support via styles.hashClass, plus createStyled as a thin wrapper over styles.component with typed variant props.

Co-authored-by: Cursor <cursoragent@cursor.com>
@dbanksdesign dbanksdesign merged commit 13ddff8 into main Jul 4, 2026
7 checks passed
@dbanksdesign dbanksdesign deleted the add-typestyles-react-p3-25 branch July 4, 2026 17:12
@github-actions github-actions Bot mentioned this pull request Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants