Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit ebfe119

Browse files
committed
fix(switch): add adapter types
1 parent 09fcd73 commit ebfe119

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/switch/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
import * as React from 'react';
2424
import classnames from 'classnames';
25+
import {MDCSwitchAdapter} from '@material/switch/adapter';
2526
import {MDCSwitchFoundation} from '@material/switch/foundation';
2627
import ThumbUnderlay from './ThumbUnderlay';
2728
import NativeControl from './NativeControl';
@@ -88,7 +89,7 @@ export default class Switch extends React.Component<SwitchProps, SwitchState> {
8889
return classnames('mdc-switch', Array.from(classList), className);
8990
}
9091

91-
get adapter() {
92+
get adapter(): MDCSwitchAdapter {
9293
return {
9394
addClass: (className: string) => {
9495
const {classList} = this.state;

0 commit comments

Comments
 (0)