Skip to content

Commit

Permalink
[joy-ui][Switch] Fix missing class name (mui#39327)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bestwebdesign authored and mnajdova committed Oct 9, 2023
1 parent e57e044 commit 2691592
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/mui-joy/src/Switch/Switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { SwitchTypeMap, SwitchOwnerState } from './SwitchProps';
import FormControlContext from '../FormControl/FormControlContext';

const useUtilityClasses = (ownerState: SwitchOwnerState) => {
const { checked, disabled, focusVisible, readOnly, color, variant } = ownerState;
const { checked, disabled, focusVisible, readOnly, color, variant, size } = ownerState;

const slots = {
root: [
Expand All @@ -24,6 +24,7 @@ const useUtilityClasses = (ownerState: SwitchOwnerState) => {
readOnly && 'readOnly',
variant && `variant${capitalize(variant)}`,
color && `color${capitalize(color)}`,
size && `size${capitalize(size)}`,
],
thumb: ['thumb', checked && 'checked'],
track: ['track', checked && 'checked'],
Expand Down

0 comments on commit 2691592

Please sign in to comment.