Skip to content

Commit fedb16a

Browse files
fix: revert runtime validation in favor of @todo comment
1 parent f5a6283 commit fedb16a

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

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

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,13 @@ export abstract class DividerBase extends SizedMixin(SpectrumElement, {
3737

3838
/**
3939
* The static color variant to use for the divider.
40+
*
41+
* @todo Add runtime validation separately. When implementing,
42+
* access STATIC_COLORS from this.constructor.STATIC_COLORS to ensure
43+
* correct values are used.
4044
*/
4145
@property({ reflect: true, attribute: 'static-color' })
42-
public get staticColor(): DividerStaticColor | undefined {
43-
return this._staticColor;
44-
}
45-
46-
public set staticColor(value: DividerStaticColor | undefined) {
47-
if (
48-
value != null &&
49-
!(DIVIDER_STATIC_COLORS as readonly string[]).includes(value)
50-
) {
51-
// Silently ignore invalid values
52-
this._staticColor = undefined;
53-
return;
54-
}
55-
this._staticColor = value;
56-
}
57-
58-
private _staticColor?: DividerStaticColor;
46+
public staticColor?: DividerStaticColor;
5947

6048
protected override firstUpdated(changed: PropertyValues<this>): void {
6149
super.firstUpdated(changed);

0 commit comments

Comments
 (0)