Skip to content

Commit

Permalink
Updated options API to be backwards compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
Shenato committed Jun 11, 2023
1 parent 0aeab87 commit 9d1eec4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/bracket-single/single-elim-bracket.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ SoloWalkOverBracketCustomHeaders.args = {
options: {
style: {
roundHeader: {
fontColor: undefined,
fontFamily: undefined,
roundTextGenerator: (currentRoundNumber, roundsTotalNumber) => {
if (currentRoundNumber === roundsTotalNumber) {
return 'Grand Top';
Expand Down
6 changes: 3 additions & 3 deletions src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ export const defaultStyle: Options = {
height: 40,
marginBottom: 25,
fontSize: 16,
fontColor: undefined,
fontColor: 'white',
backgroundColor: 'rgb(47, 54, 72)',
fontFamily: undefined,
roundTextGenerator: undefined
fontFamily: '"Roboto", "Arial", "Helvetica", "sans-serif"',
roundTextGenerator: undefined,
},
roundSeparatorWidth: 24,
lineInfo: {
Expand Down
2 changes: 1 addition & 1 deletion src/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export type Options = {
fontFamily?: string;
roundTextGenerator?: (
currentRoundNumber: number,
roundsTotalNumber: number,
roundsTotalNumber: number
) => string | undefined;
};

Expand Down

0 comments on commit 9d1eec4

Please sign in to comment.