mohux / react-brackets

Reusable and customizable react brackets component, you can use it to build components such as single elimination, or double elimination brackets
105 stars 47 forks source link

Adding two sided bracket #28

Closed Oliver-Looney closed 2 weeks ago

Oliver-Looney commented 1 year ago

This pr adds support for two sided brackets with Single Elimination.

Single Elimination now has an optional boolean flag, twoSided, which defaults to false.

If twoSided is true, the rounds are rendered up to the last round, but with only the first half of each round's seeds rendered. Then the last round's seed is rendered. Finally, the rounds are again rendered up to the last round, but this time the second half of each round's seeds are rendered.

web

image

code for example above: example/src/components/two-sided-single-elimination/index.tsx

The-Kian commented 4 months ago

This is awesome