A simple add-on I half-promised to publish after my presentation at Vaadin Create 2024.
6 Likes
Half-promised, fully delivered
Awesome Thank you
I would like to try your add-on in a Hilla app:
<ThemeSelect className="minimal" label="Choose theme" />;
How can I import ThemeSelect
into my Hilla view?
So Jouni made the choice to not publish a separate NPM package for this, and instead ship the React component as part of the Maven module. With that, the frontend parts of the module are copied by Vaadin to frontend/generated/jar-resources
on application start (and some specific Maven goal I guess).
So to use it with React you need this import:
import { ThemeSelect } from "Frontend/generated/jar-resources/themeselect/ThemeSelect";
This one seems to work as well:
import { ThemeSelect } from "@vaadin/flow-frontend/themeselect/ThemeSelect";
2 Likes
Thank you, @sissbruecker!
Oh, yeah, thanks! I forgot to add that detail to the readme/instructions.