brackets-viewer.js
brackets-viewer.js copied to clipboard
Export types and interfaces
Same as https://github.com/Drarig29/brackets-manager.js/issues/53
Also export the BracketsViewer class so that it can be imported in React for example.
So that instead of doing:
window.bracketsViewer.render({
stages: data.stage,
matches: data.match,
matchGames: data.match_game,
participants: data.participant,
});
You can do:
import { BracketsViewer } from 'brackets-viewer';
const bracketsViewer = new BracketsViewer();
bracketsViewer.render({
stages: data.stage,
matches: data.match,
matchGames: data.match_game,
participants: data.participant,
});
Fixing this should fix #60
Hey! Do you know when this will be added?
I'm not sure, but I might do it this week-end if you need it.
I'm using the other way but it would be nice. No rush either way.
On Tue, Jun 22, 2021, 12:35 PM Corentin Girard @.***> wrote:
I'm not sure, but I might do it this week-end if you need it.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Drarig29/brackets-viewer.js/issues/27#issuecomment-866146908, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEVCYGNL6IWCLAKYHFELJJTTUC3VXANCNFSM4XSG5UBQ .
BracketsViewer is now exported from src/index.ts