From 9d1eec459564c6f02024aa5a62e558ca0561b9e3 Mon Sep 17 00:00:00 2001 From: Shenato Date: Sun, 11 Jun 2023 16:57:14 +0200 Subject: [PATCH] Updated options API to be backwards compatible --- src/bracket-single/single-elim-bracket.stories.jsx | 2 ++ src/settings.ts | 6 +++--- src/types.tsx | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/bracket-single/single-elim-bracket.stories.jsx b/src/bracket-single/single-elim-bracket.stories.jsx index fa31651..4fc1710 100644 --- a/src/bracket-single/single-elim-bracket.stories.jsx +++ b/src/bracket-single/single-elim-bracket.stories.jsx @@ -72,6 +72,8 @@ SoloWalkOverBracketCustomHeaders.args = { options: { style: { roundHeader: { + fontColor: undefined, + fontFamily: undefined, roundTextGenerator: (currentRoundNumber, roundsTotalNumber) => { if (currentRoundNumber === roundsTotalNumber) { return 'Grand Top'; diff --git a/src/settings.ts b/src/settings.ts index c738fc4..249b93c 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -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: { diff --git a/src/types.tsx b/src/types.tsx index 1ae9f24..cd649d6 100644 --- a/src/types.tsx +++ b/src/types.tsx @@ -64,7 +64,7 @@ export type Options = { fontFamily?: string; roundTextGenerator?: ( currentRoundNumber: number, - roundsTotalNumber: number, + roundsTotalNumber: number ) => string | undefined; };