From 84b7f0a1466c5af2f435ef1b69bae15a68c352c8 Mon Sep 17 00:00:00 2001 From: Markus Moltke Date: Fri, 10 Sep 2021 15:55:09 +0200 Subject: [PATCH] Fixed issue, that caused Part to be missing from ListItem (ts) (#1529) * Fixed issue, that caused Part to be missing from ListItem (ts) * Possbile additional fix required --- .../src/components/listItem/index.d.ts | 26 ++++++++++++++++--- src/components/listItem/index.tsx | 8 +++--- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/generatedTypes/src/components/listItem/index.d.ts b/generatedTypes/src/components/listItem/index.d.ts index 54bf0f5cec..9cdd631209 100644 --- a/generatedTypes/src/components/listItem/index.d.ts +++ b/generatedTypes/src/components/listItem/index.d.ts @@ -1,7 +1,25 @@ import React from 'react'; -import { ListItemProps } from './types'; -export { ListItemProps }; -declare const _default: React.ComponentClass { + static displayName: string; + static Part: typeof ListItemPart; + constructor(props: ListItemProps); + onHideUnderlay(): void; + onShowUnderlay(): void; + setPressed(isPressed: boolean): void; + renderViewContainer: () => JSX.Element; + renderCustomContainer(Container: React.ComponentType): JSX.Element; + renderChildren(): React.DetailedReactHTMLElement[] | null | undefined; + render(): JSX.Element; +} +declare const _default: React.ComponentClass< + ListItemProps & { useCustomTheme?: boolean | undefined; -}, any>; + }, + any +> & + typeof ListItem; export default _default; diff --git a/src/components/listItem/index.tsx b/src/components/listItem/index.tsx index 396faccde6..d0fe95f92c 100644 --- a/src/components/listItem/index.tsx +++ b/src/components/listItem/index.tsx @@ -9,7 +9,7 @@ import {ListItemProps} from './types'; type ListItemState = { pressed: boolean; -} +}; class ListItem extends Component { static displayName = 'ListItem'; @@ -20,7 +20,7 @@ class ListItem extends Component { underlayColor: Colors.dark70 }; - static Part = ListItemPart; + static Part: typeof ListItemPart; styles = createStyles(this.props.height); @@ -84,4 +84,6 @@ function createStyles(height: ListItemProps['height']) { export {ListItemProps}; -export default asBaseComponent(ListItem); +ListItem.Part = ListItemPart; + +export default asBaseComponent(ListItem);