Skip to content

Commit

Permalink
Update pages that the theme toggle should not appear on
Browse files Browse the repository at this point in the history
Signed-off-by: Musale Martin <[email protected]>
  • Loading branch information
musale committed Aug 3, 2023
1 parent 5a9e03b commit 666438e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .storybook/addons/codeEditorAddon/codeAddon.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ export const withCodeEditor = makeDecorator({
skipIfNoParametersOrOptions: false,
wrapper: (getStory, context, { options }) => {
const forOptions = options ? options.disableThemeToggle : false;
const forContext =
context && (context.name === 'Custom CSS Properties' || context.title.toLowerCase().includes('templating'));
const title =
['Custom CSS Properties', 'Theme'].includes(context.name) || context.title.toLowerCase().includes('templating');
const forContext = context && title;
const disableThemeToggle = forOptions || forContext;
let story = getStory(context);

Expand Down

0 comments on commit 666438e

Please sign in to comment.