Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Extra ] bracket in cn class in DialogScrollContent component after dialog installation #772

Closed
2 tasks
Dominik221 opened this issue Sep 19, 2024 · 1 comment
Labels
bug Something isn't working detypes Generate vanilla JavaScript samples from TypeScript

Comments

@Dominik221
Copy link

Dominik221 commented Sep 19, 2024

Reproduction

  1. Install shadcn-vue.
  2. Install npx shadcn-vue@latest add dialog
  3. Run the application and observe the error message related to the extra closing bracket.

Bug description

After installing the Dialog component from the shadcn-vue package, an unnecessary closing bracket ] is generated at the end of the class string inside the :class attribute for DialogScrollContent.

The problematic code looks like this:

:class=" cn( 'relative z-50 grid w-full max-w-lg my-8 gap-4 border border-border bg-background p-6 shadow-lg duration-200 sm:rounded-lg md:w-full', props.class )]"

System Info

System:
    OS: macOS 15.0
    CPU: (8) arm64 Apple M1 Pro
    Memory: 87.11 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.6.1 - ~/.nvm/versions/node/v21.6.1/bin/node
    npm: 10.2.4 - ~/.nvm/versions/node/v21.6.1/bin/npm
  Browsers:
    Brave Browser: 128.1.69.168
    Chrome: 128.0.6613.138
    Safari: 18.0

Contributes

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests
@Dominik221 Dominik221 added the bug Something isn't working label Sep 19, 2024
@sadeghbarati sadeghbarati added the detypes Generate vanilla JavaScript samples from TypeScript label Sep 19, 2024
@zernonia zernonia mentioned this issue Oct 11, 2024
8 tasks
@zernonia
Copy link
Member

Fixed on v0.11.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working detypes Generate vanilla JavaScript samples from TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants