Mahcks / wails-vite-react-tailwind-shadcnui-ts

31 stars 3 forks source link

using Shadcn Calendar Component causes Wails to render Blank screen #1

Open sankalpa-adhikari-sa opened 10 months ago

sankalpa-adhikari-sa commented 10 months ago

Hi there, Thank you for the template. It made setting up React Js, Tailwind, shadcn and vite project easy. But I faced a small problem: I tried using Shadcn Calendar component. Basically, copied the example of Shadcn Calendar component. This renders Wails to render Blank White screen. I also tried some other components. It seems like They all work fine except Calendar/Datepicker.

Screenshot from 2023-11-17 22-22-03 Here what this renders like, Screenshot from 2023-11-17 22-30-40

rve0 commented 3 months ago

Hey Sankalpa, I see this reaction is late but Ive just started using Wails so I couldnt have gotten here quicker. My frontend didnt build with the calendar because of the "...props" being passed as parameter to the IconLeft and IconRight components was unused. If you have the same version of the calendar as I do, then you can fix this issue by calling changing your code to this:

IconLeft: () => <ChevronLeft className="h-4 w-4" />,
IconRight: () => <ChevronRight className="h-4 w-4" />,

This seems to be an issue in shadcn instead of this template, so I this ticket could be closed, since this issue doesn't specifically apply to this repository.