Replies: 1 comment
-
Hi, @ms264556! For now, I think your solution is the recommended one, but we can discuss some proposals to make it easier. The first proposal is manipulating the related view (DOM) through a callback: ```js eval
button = Inputs.button("add", {
enhance: (view) => view.classList.add("VPButton", "medium", "brand"),
});
``` The second proposal is exposing the DOM of a signal by the view attribute: ```js eval
vp(Inputs.button("add"));
``` function vp(signal) {
signal.view.classList.add("VPButton", "medium", "brand");
} But there is a challenge for both of them in VitePress: you should set a random data attribute to the view as well, which is not a constant value. ![]() I'm not sure how to solve it. Do you have any better ideas? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How should I be styling the Input controls when I'm using this with VitePress?
Buttons etc. don't currently pick up the standard VitePress styling. I can add global css, but is this the recommended solution?
e.g. in my theme/style/custom.css I added the following (which seems to work OK for now):-
Beta Was this translation helpful? Give feedback.
All reactions