Skip to content

Commit f5a6283

Browse files
Revert "fix: remove static property"
This reverts commit 8c85c59.
1 parent d09e908 commit f5a6283

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

second-gen/packages/core/components/divider/Divider.base.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export abstract class DividerBase extends SizedMixin(SpectrumElement, {
2828
validSizes: DIVIDER_VALID_SIZES,
2929
noDefaultSize: true,
3030
}) {
31+
static readonly STATIC_COLORS = DIVIDER_STATIC_COLORS;
3132
/**
3233
* Whether the divider is vertical. If false, the divider is horizontal. The default is false.
3334
*/

second-gen/packages/swc/components/divider/stories/divider.stories.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ import type { Meta, StoryObj as Story } from '@storybook/web-components';
1515
import { getStorybookHelpers } from '@wc-toolkit/storybook-helpers';
1616

1717
import { Divider } from '@swc/components/divider';
18-
import {
19-
DIVIDER_STATIC_COLORS,
20-
DIVIDER_VALID_SIZES,
21-
} from '@swc/core/components/divider';
2218

2319
import '@swc/components/divider';
2420

@@ -42,7 +38,7 @@ const { events, args, argTypes, template } = getStorybookHelpers('swc-divider');
4238
argTypes['static-color'] = {
4339
...argTypes['static-color'],
4440
control: { type: 'select' },
45-
options: [undefined, ...DIVIDER_STATIC_COLORS],
41+
options: [undefined, ...Divider.STATIC_COLORS],
4642
};
4743

4844
/**
@@ -89,7 +85,7 @@ export const Default: Story = {
8985
export const Sizes: Story = {
9086
render: () => html`
9187
<div style="display: flex; flex-direction: row; gap: 16px;">
92-
${DIVIDER_VALID_SIZES.map(
88+
${Divider.VALID_SIZES.map(
9389
(size) => html`
9490
<div>
9591
<h3>
@@ -117,7 +113,7 @@ export const Vertical: Story = {
117113
},
118114
render: (args: Record<string, unknown>) => html`
119115
<div style="display: flex; flex-direction: row; gap: 48px;">
120-
${DIVIDER_VALID_SIZES.map((size) =>
116+
${Divider.VALID_SIZES.map((size) =>
121117
template({ ...args, size: size as DividerSize })
122118
)}
123119
</div>
@@ -134,7 +130,7 @@ export const StaticBlack: Story = {
134130
},
135131
render: (args: Record<string, unknown>) => html`
136132
<div style="display: flex; gap: 24px; align-items: center;">
137-
${DIVIDER_VALID_SIZES.map((size) =>
133+
${Divider.VALID_SIZES.map((size) =>
138134
template({ ...args, size: size as DividerSize })
139135
)}
140136
</div>
@@ -148,7 +144,7 @@ export const StaticWhite: Story = {
148144
},
149145
render: (args: Record<string, unknown>) => html`
150146
<div style="display: flex; gap: 24px; align-items: center;">
151-
${DIVIDER_VALID_SIZES.map((size) =>
147+
${Divider.VALID_SIZES.map((size) =>
152148
template({ ...args, size: size as DividerSize })
153149
)}
154150
</div>

0 commit comments

Comments
 (0)