brackets-viewer.js icon indicating copy to clipboard operation
brackets-viewer.js copied to clipboard

Export types and interfaces

Open Drarig29 opened this issue 4 years ago • 5 comments

Same as https://github.com/Drarig29/brackets-manager.js/issues/53

Drarig29 avatar Feb 13 '21 15:02 Drarig29

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,
});

Drarig29 avatar Mar 02 '21 21:03 Drarig29

Fixing this should fix #60

Drarig29 avatar Jun 11 '21 12:06 Drarig29

Hey! Do you know when this will be added?

Abdulakibu avatar Jun 22 '21 01:06 Abdulakibu

I'm not sure, but I might do it this week-end if you need it.

Drarig29 avatar Jun 22 '21 16:06 Drarig29

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 .

Abdulakibu avatar Jun 22 '21 16:06 Abdulakibu

BracketsViewer is now exported from src/index.ts

Drarig29 avatar Jul 10 '23 19:07 Drarig29