docs: add missing context in createconfiguration (#767)

* docs: add missing context in createconfiguration

* feat: update the type definition
This commit is contained in:
Li Kang
2022-02-25 11:12:05 +01:00
committed by GitHub
parent 86f21c4b05
commit d554999f81
5 changed files with 33 additions and 11 deletions

View File

@@ -134,7 +134,9 @@ const m = embed.createConfiguration({
// create an alternate config with dark theme
// and inherit the config from the previous
const d = m.createConfiguration({
theme: 'dark',
context: {
theme: 'dark',
},
});
m(app).render({ type: 'mekko' }); // will render the object with default theme
@@ -424,8 +426,10 @@ and should respected by you when implementing the supernova.
```js
// configure embed to disallow active interactions when rendering
embed(app, {
constraints: {
active: true, // do not allow interactions
context: {
constraints: {
active: true, // do not allow interactions
},
},
}).render({ element, id: 'sdfsdf' });
```