Skip to content

Commit ee9cb25

Browse files
[update] the setTheme() method after review
1 parent c7484a6 commit ee9cb25

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

docs/api/config/js_kanban_theme_config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ description: You can learn about the theme config in the documentation of the DH
1515
~~~jsx {}
1616
theme?: {
1717
name: string, // "material" (default) | "willow" | "willow-dark"
18-
fonts: boolean
18+
fonts?: boolean
1919
};
2020
~~~
2121

docs/api/methods/js_kanban_settheme_method.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,33 @@ description: You can learn about the setTheme method in the documentation of the
1313
### Usage
1414

1515
~~~jsx {}
16-
setTheme(theme?: string): void;
16+
setTheme({
17+
name?: string, // "material" (default) | "willow" | "willow-dark"
18+
fonts?: boolean
19+
}): void;
1720
~~~
1821

1922
### Parameters
2023

21-
- `theme` - (optional) a theme to be applied to Kanban. There are 3 available themes:
24+
- `name` - (optional) a theme name to be applied to Kanban. There are 3 available themes:
2225
- "material" (*default*)
2326
- "willow"
2427
- "willow-dark"
28+
- `fonts` - (optional) enables/disables fonts loading from the CDN (wxi font)
2529

2630
:::tip
27-
To specify the initial theme, you can use the [**setTheme()**](../../config/js_kanban_theme_config) property.
31+
To specify the initial theme, you can use the [**theme**](../../config/js_kanban_theme_config) property.
2832
:::
2933

3034
### Example
3135

3236
~~~jsx {6}
3337
// create Kanban
34-
const board = new eventCalendar.EventCalendar("#root", {
38+
const board = new kanban.Kanban("#root", {
3539
// initial configuration parameters
3640
});
3741
// set the "willow" theme
38-
board.setTheme( "willow" );
42+
board.setTheme({ name: "willow", font: false });
3943
~~~
4044

4145
**Change log:** The method was added in v2.0

0 commit comments

Comments
 (0)