Skip to content

Commit

Permalink
align with newer examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra committed Oct 14, 2019
1 parent 80ffb25 commit f4cd998
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions packages/material-ui/src/ListSubheader/ListSubheader.d.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import * as React from 'react';
import { StandardProps } from '..';
import { OverridableComponent, SimplifiedPropsOf } from '../OverridableComponent';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';

declare const ListSubheader: OverridableComponent<{
props: React.HTMLAttributes<HTMLDivElement> & {
export interface ListSubheaderTypeMap<P = {}, D extends React.ElementType = 'li'> {
props: P & {
color?: 'default' | 'primary' | 'inherit';
disableGutters?: boolean;
disableSticky?: boolean;
inset?: boolean;
};
defaultComponent: React.ElementType<React.HTMLAttributes<HTMLDivElement>>;
defaultComponent: D;
classKey: ListSubheaderClassKey;
}>;
}

declare const ListSubheader: OverridableComponent<ListSubheaderTypeMap>;

export type ListSubheaderClassKey =
| 'root'
Expand All @@ -21,6 +23,9 @@ export type ListSubheaderClassKey =
| 'sticky'
| 'gutters';

export type ListSubheaderProps = SimplifiedPropsOf<typeof ListSubheader>;
export type ListSubheaderProps<
D extends React.ElementType = ListSubheaderTypeMap['defaultComponent'],
P = {}
> = OverrideProps<ListSubheaderTypeMap<P, D>, D>;

export default ListSubheader;

0 comments on commit f4cd998

Please sign in to comment.