Closed adrian-kong closed 2 years ago
It looks like I forgot to even export createTheme
, that's my bad. 😓 Fixing it ASAP
Opened a PR now just waiting for someone from G-loot to approve since I don't have write access here anymore. 😅 https://github.com/g-loot/react-tournament-brackets/pull/15
Ty! Is the svg-viewer missing an issue or just my side? (/src folder only has type.d.ts and folders no svg-viewer file)
When you import it does it throw an error similar to createTheme?
If I remmeber correctly, this package should be shipping a js bundle without much of the original source code files and type files for intellisense and typescript support.
So if src doesn't have the same source code in it and you're able to import stuff then there's no problems there, only createTheme was missing as far as I can see in the source code. I've used the package myself and I've imported and used everything except createTheme so that probably explains why I never found out by myself that I forgot to export it. Hope this answers your question! Just import and use stuff like in the documentation and if you get an error then there's issues otherwise don't worry what the package looks like on your local machine, the source code is most likely just bundled into a single js file that is obfuscated and minified.
Ah yeah there's no errors, that's good to know ty!
Using the example code
I'm getting
Uncaught TypeError: (0 , _g_loot_react_tournament_brackets__WEBPACK_IMPORTED_MODULE_0__.createTheme) is not a function
and with further inspection,
The SVGViewer is also not found in the
index.d.ts
on latest version 1.0.15 path/src/svg-viewer
not foundI'm pretty new to react so I'm not sure I'm doing this right but would love to use this great library
Thanks