Skip to content

Commit

Permalink
Change the typings of Clock to use a static type as ClassKey
Browse files Browse the repository at this point in the history
This fixes some compatibility issues with material-ui 4.9.0
It should also be backwards compatible

Fixes mui#1465
  • Loading branch information
mvestergaard committed Jan 23, 2020
1 parent a865eaa commit 2bf1039
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/src/views/Clock/Clock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import ClockType, { ClockViewType } from '../../constants/ClockType';
import { getHours, getMinutes } from '../../_helpers/time-utils';
import { withStyles, createStyles, WithStyles, Theme } from '@material-ui/core/styles';

export interface ClockProps extends WithStyles<typeof styles> {
type ClassKey = 'container' | 'clock' | 'squareMask' | 'pin';

export interface ClockProps extends WithStyles<ClassKey> {
type: ClockViewType;
value: number;
onChange: (value: number, isFinish?: boolean) => void;
Expand Down

0 comments on commit 2bf1039

Please sign in to comment.