Skip to content

Commit

Permalink
chore: use themed in sheet test
Browse files Browse the repository at this point in the history
  • Loading branch information
Caele committed Mar 27, 2023
1 parent acca1d5 commit 32cd3f8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
23 changes: 18 additions & 5 deletions test/rendering/sheet/configured.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const pie = {
component: {
mounted(el) {
// eslint-disable-next-line
el.innerHTML = '<div id="pie" style="background: aliceblue; height:100%; width:100%;">Hello pie</div>';
el.innerHTML = '<div id="pie" style="height:100%; width:100%;">Hello pie</div>';
},
},
};
Expand All @@ -18,10 +18,9 @@ const bar = function (env) {
component: {
mounted(el) {
// eslint-disable-next-line
el.innerHTML = `<div id="bar" style="font-size: 64px; background: tan; height:100%; width:100%;">${env.translator.get(
'hello',
['bar']
)}</div>`;
el.innerHTML = `<div id="bar" style="font-size: 64px; height:100%; width:100%;">${env.translator.get('hello', [
'bar',
])}</div>`;
},
},
};
Expand All @@ -31,7 +30,21 @@ const bar = function (env) {
const configured = stardust.embed.createConfiguration({
context: {
language: 'sv-SE',
theme: 'bla',
},
themes: [
{
id: 'bla',
load: () =>
Promise.resolve({
_inherit: false,
color: '#fff',
backgroundColor: '#ff00ff',
fontSize: '20px',
fontFamily: 'Arial',
}),
},
],
types: [
{
name: 'piechart',
Expand Down
3 changes: 3 additions & 0 deletions test/rendering/sheet/sheet-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ window.getFuncs = function getFuncs() {
fontFamily: 'Lucida Console, monospace',
},
},
bgColor: {
color: '#00ff00',
},
},
],
};
Expand Down

0 comments on commit 32cd3f8

Please sign in to comment.