I tried compiling tooltip2 index.ts to .js with tsc, got lots of errors - is this kind of use possible? #8369
-
I want to style two button tooltips on a page, if that is possible without learning any/much typescript. (Standard/w3c css div/span approaches so far hide the button I want the tooltip on.) The line numbers and flagged code from tsc have no obvious connection to the code in index.ts, so it's as if they are from a compile check on emitted code with imports instantiated.
Solution seems to be
which leads to unsatisfied imports (rxjs,..) and inability to specify --outFile. rxjs seems to be React, so possibly this isn't as lightweight as I thought. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @phobrain, To style a tooltip, only CSS should be needed, unless you want to change the hover logic and not only how it looks, but if you want to have it always on, then I don't think you need the logic at all, just some HTML element that would be always displayed. |
Beta Was this translation helpful? Give feedback.
Hi @phobrain,
I'm not a TypeScript/RxJS dev, so I'm not sure if it's even possible to compile a component as a separate module as RxJS is a reactive framework, which relies on the chain of events, which starts in the index.js bundle, so there is a bunch of scaffolding around the component.
To style a tooltip, only CSS should be needed, unless you want to change the hover logic and not only how it looks, but if you want to have it always on, then I don't think you need the logic at all, just some HTML element that would be always displayed.
A minimal reproduction would definitely help to see what is happening and what you actually want.