Skip to content

fix: use the declared class name utility - #26

Open
lindixu6-hash wants to merge 1 commit into
eylonmiz:mainfrom
lindixu6-hash:fix/declared-classname-utility
Open

fix: use the declared class name utility#26
lindixu6-hash wants to merge 1 commit into
eylonmiz:mainfrom
lindixu6-hash:fix/declared-classname-utility

Conversation

@lindixu6-hash

Copy link
Copy Markdown

Problem

Issue #22 reports that generated components crash when they render Typography because it imports classnames, which is not declared by the @react-agent/shadcn-ui workspace.

The same undeclared direct import also exists in the exported JsonSkeleton example. classnames appears in yarn.lock only as a transitive dependency, so relying on it is not a stable workspace contract.

Change

Use the design system's existing cn helper in both locations:

  • components/ui/typography.tsx
  • components/examples/json-skeleton/demo.tsx

That helper is already used throughout the component library and is backed by the workspace's declared clsx and tailwind-merge dependencies. No dependency or lockfile changes are needed.

Closes #22.

Verification

  • both changed TSX files transpile without TypeScript syntax diagnostics
  • both relative cn imports resolve to frontend/shadcn-ui/src/lib/utils.ts
  • clsx and tailwind-merge are direct workspace dependencies
  • no classnames imports remain under frontend/shadcn-ui/src
  • git diff --check passes

I could not claim a full workspace build: two clean Yarn v1 install attempts remained in the dependency-fetch stage, and an offline retry identified an incomplete cached package. This PR therefore reports the deterministic source-level checks above rather than presenting a partial install as a green build.

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.

missing 'classnames' issue in typography component

1 participant