Skip to content

Commit e2f3c28

Browse files
feat(switch): add warning for handle-height and handle-width which are not yet implmented.
PiperOrigin-RevId: 467226388
1 parent e2e2c9d commit e2f3c28

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

switch/lib/_switch-theme.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,23 @@ $_forced-colors-theme: (
114114
@return $theme;
115115
}
116116

117+
@function _warn-of-not-implemented($theme) {
118+
// TODO(b/230484095): remove this warning once these are implemented.
119+
@if (
120+
map.has-key($theme, selected-handle-height) or
121+
map.has-key($theme, selected-handle-width) or
122+
map.has-key($theme, unselected-handle-height) or
123+
map.has-key($theme, unselected-handle-width) or
124+
map.has-key($theme, pressed-handle-height) or
125+
map.has-key($theme, pressed-handle-width)
126+
) {
127+
@warn '`handle-height` and `handle-width` are not yet implemented. see b/230484095';
128+
}
129+
@return $theme;
130+
}
131+
117132
@mixin theme($theme, $resolvers: resolvers.$material) {
133+
$theme: _warn-of-not-implemented($theme);
118134
$theme: theme.validate-theme($light-theme, $theme);
119135
$theme: _resolve-theme($theme, $resolvers);
120136
$theme: theme.create-theme-vars($theme, switch);
@@ -123,6 +139,7 @@ $_forced-colors-theme: (
123139
}
124140

125141
@mixin theme-styles($theme, $resolvers: resolvers.$material) {
142+
$theme: _warn-of-not-implemented($theme);
126143
$theme: theme.validate-theme-styles($light-theme, $theme);
127144
$theme: _resolve-theme($theme, $resolvers);
128145
$theme: theme.create-theme-vars($theme, switch);

0 commit comments

Comments
 (0)