Skip to content

Commit a1e5452

Browse files
update docs
1 parent e7f8785 commit a1e5452

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/components/Theming.stories.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ Check out the example below in which we customize some of the elements.
1818
import React from 'react';
1919
import { Timeline, Events, TextEvent, themes, createTheme } from '@merc/react-timeline';
2020

21+
/**
22+
* `createTheme` is a helper function that takes two arguments:
23+
* - a base theme to extend from
24+
* - the new theme properties
25+
* It uses deep copying behind the scenes to create a new theme object with
26+
* all of the required properties.
27+
*/
2128
const customTheme = createTheme(themes.default, {
2229
card: {
2330
backgroundColor: '#efefef',

0 commit comments

Comments
 (0)