Skip to content

Commit feb674b

Browse files
authored
Merge pull request #117 from LambdaTest/stage
Release PR Add background theme support
2 parents 5aae356 + ac02f32 commit feb674b

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

commands/storybook.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ async function storybook(serve, options) {
7171
if (Array.isArray(storybookConfig.lazyLoadedStories) && storybookConfig.lazyLoadedStories.length > 0) {
7272
lazyLoadedStories = storybookConfig.lazyLoadedStories;
7373
}
74+
let useGlobals = false;
75+
let backgroundTheme = storybookConfig.backgroundTheme || 'light';
76+
if (storybookConfig.backgroundTheme && ['light', 'dark'].includes(storybookConfig.backgroundTheme.toLowerCase())) {
77+
useGlobals = true;
78+
backgroundTheme = storybookConfig.backgroundTheme.toLowerCase();
79+
}
7480

7581
// Upload Storybook static
7682
await static.getSignedUrl(options)
@@ -154,7 +160,9 @@ async function storybook(serve, options) {
154160
waitForTimeout: storybookConfig.waitForTimeout,
155161
customViewports: storybookConfig.customViewports,
156162
useOnlyCustomViewports: storybookConfig.useOnlyCustomViewports,
157-
lazyLoadedStories: lazyLoadedStories
163+
lazyLoadedStories: lazyLoadedStories,
164+
useGlobals: useGlobals,
165+
backgroundTheme: backgroundTheme
158166
},
159167
git: {
160168
branch: currentBranch || commit.branch|| '',

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lambdatest/smartui-storybook",
3-
"version": "1.1.27",
3+
"version": "1.1.28",
44
"description": "LambdaTest's command-line interface (CLI) aimed to help you run your SmartUI tests on LambdaTest platform",
55
"main": "index.js",
66
"repository": {

0 commit comments

Comments
 (0)