Skip to content

Commit 9931a8e

Browse files
committed
chore: remove darkest as SB option (#2679)
1 parent 3c0628b commit 9931a8e

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

.storybook/decorators/contextsWrapper.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ export const withContextWrapper = makeDecorator({
2727
/** @type string */
2828
const scale = args.scale ? args.scale : getDefaultValue(argTypes.scale) ?? "medium";
2929

30-
const colors = ["light", "dark", "darkest"];
30+
const colors = ["light", "dark"];
3131
const scales = ["medium", "large"];
3232

3333
useEffect(() => {
3434
const container =
3535
viewMode === "docs" &&
3636
!window.isChromatic() &&
37-
!id.includes('foundation')
38-
? document.querySelector('#root-inner') ?? document.body
37+
!id.includes("foundation")
38+
? document.querySelector("#root-inner") ?? document.body
3939
: document.body;
4040

4141
container.classList.toggle("spectrum", true);
@@ -53,9 +53,11 @@ export const withContextWrapper = makeDecorator({
5353
// Change background color when demonstrating static color options.
5454
if (args.staticColor === "black") {
5555
container.style.background = "var(--spectrum-examples-gradient-static-black)";
56-
} else if (args.staticColor === "white") {
56+
}
57+
else if (args.staticColor === "white") {
5758
container.style.background = "var(--spectrum-examples-gradient-static-white)";
58-
} else {
59+
}
60+
else {
5961
container.style.removeProperty("background");
6062
}
6163
}, [color, scale, isExpress, args.staticColor]);

.storybook/preview.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
import DocumentationTemplate from './DocumentationTemplate.mdx';
2+
import DocumentationTemplate from "./DocumentationTemplate.mdx";
33

44
import { withActions } from "@storybook/addon-actions/decorator";
55
import {
@@ -81,17 +81,16 @@ export const argTypes = {
8181
description: "Controls the color context of the component.",
8282
type: { required: true },
8383
table: {
84-
type: { summary: "light | dark | darkest" },
84+
type: { summary: "light | dark" },
8585
defaultValue: { summary: "light" },
8686
category: "Global",
8787
},
88-
options: ["light", "dark", "darkest"],
88+
options: ["light", "dark"],
8989
control: {
9090
type: "select",
9191
labels: {
9292
light: "Light (default)",
9393
dark: "Dark",
94-
darkest: "Darkest",
9594
},
9695
},
9796
},
@@ -187,11 +186,11 @@ export const parameters = {
187186
panelPosition: "bottom",
188187
showToolbar: true,
189188
isFullscreen: false,
190-
actions: { argTypesRegex: '^on.*' },
189+
actions: { argTypesRegex: "^on.*" },
191190
options: {
192191
storySort: {
193192
method: "alphabetical",
194-
order: ['Guides', ['Contributing', '*', 'Adobe Code of Conduct', 'Changelog'], 'Foundations', 'Components', ['Docs', 'Default', '*'], '*'],
193+
order: ["Guides", ["Contributing", "*", "Adobe Code of Conduct", "Changelog"], "Foundations", "Components", ["Docs", "Default", "*"], "*"],
195194
includeNames: true,
196195
},
197196
},

0 commit comments

Comments
 (0)