Skip to content

Commit

Permalink
chore: remove darkest as SB option (#2679)
Browse files Browse the repository at this point in the history
  • Loading branch information
pfulton committed Apr 19, 2024
1 parent 3c0628b commit 9931a8e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
12 changes: 7 additions & 5 deletions .storybook/decorators/contextsWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ export const withContextWrapper = makeDecorator({
/** @type string */
const scale = args.scale ? args.scale : getDefaultValue(argTypes.scale) ?? "medium";

const colors = ["light", "dark", "darkest"];
const colors = ["light", "dark"];
const scales = ["medium", "large"];

useEffect(() => {
const container =
viewMode === "docs" &&
!window.isChromatic() &&
!id.includes('foundation')
? document.querySelector('#root-inner') ?? document.body
!id.includes("foundation")
? document.querySelector("#root-inner") ?? document.body
: document.body;

container.classList.toggle("spectrum", true);
Expand All @@ -53,9 +53,11 @@ export const withContextWrapper = makeDecorator({
// Change background color when demonstrating static color options.
if (args.staticColor === "black") {
container.style.background = "var(--spectrum-examples-gradient-static-black)";
} else if (args.staticColor === "white") {
}
else if (args.staticColor === "white") {
container.style.background = "var(--spectrum-examples-gradient-static-white)";
} else {
}
else {
container.style.removeProperty("background");
}
}, [color, scale, isExpress, args.staticColor]);
Expand Down
11 changes: 5 additions & 6 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import DocumentationTemplate from './DocumentationTemplate.mdx';
import DocumentationTemplate from "./DocumentationTemplate.mdx";

import { withActions } from "@storybook/addon-actions/decorator";
import {
Expand Down Expand Up @@ -81,17 +81,16 @@ export const argTypes = {
description: "Controls the color context of the component.",
type: { required: true },
table: {
type: { summary: "light | dark | darkest" },
type: { summary: "light | dark" },
defaultValue: { summary: "light" },
category: "Global",
},
options: ["light", "dark", "darkest"],
options: ["light", "dark"],
control: {
type: "select",
labels: {
light: "Light (default)",
dark: "Dark",
darkest: "Darkest",
},
},
},
Expand Down Expand Up @@ -187,11 +186,11 @@ export const parameters = {
panelPosition: "bottom",
showToolbar: true,
isFullscreen: false,
actions: { argTypesRegex: '^on.*' },
actions: { argTypesRegex: "^on.*" },
options: {
storySort: {
method: "alphabetical",
order: ['Guides', ['Contributing', '*', 'Adobe Code of Conduct', 'Changelog'], 'Foundations', 'Components', ['Docs', 'Default', '*'], '*'],
order: ["Guides", ["Contributing", "*", "Adobe Code of Conduct", "Changelog"], "Foundations", "Components", ["Docs", "Default", "*"], "*"],
includeNames: true,
},
},
Expand Down

0 comments on commit 9931a8e

Please sign in to comment.