Skip to content

Commit

Permalink
fix TypeScript build
Browse files Browse the repository at this point in the history
  • Loading branch information
foxriver76 committed Sep 28, 2023
1 parent 4b5c48b commit 6c8c3cb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/src/components/IsVisible.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ IsVisible.propTypes = {
name: PropTypes.string,
config: PropTypes.object,
value: PropTypes.bool,
children: PropTypes.node,
children: PropTypes.any,
};

export default IsVisible;
6 changes: 3 additions & 3 deletions src/src/components/TabContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined
import React from 'react';
import React, { ReactChildren, ReactElement } from 'react';
import { withStyles } from '@mui/styles';
import { Grid, Paper } from '@mui/material';
import { Utils } from '@iobroker/adapter-react-v5';
import type { ReactNodeLike } from 'prop-types';
import type { ReactElementLike, ReactNodeLike } from 'prop-types';

const styles = {
root: {
Expand All @@ -20,7 +20,7 @@ const styles = {

interface TabContainerProps {
/** The content of the component. */
children: ReactNodeLike;
children: React.JSX.Element | React.JSX.Element[];
/** The elevation of the tab container. */
elevation?:number;
/** Set to 'visible' show the overflow. */
Expand Down
2 changes: 1 addition & 1 deletion src/src/components/TabContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const styles = {

interface TabContentProps {
/** The content of the component. */
children: ReactNodeLike;
children: React.JSX.Element | (React.JSX.Element | null | React.JSX.Element[])[];
/** Overflow behavior */
overflow?: 'auto';
/** Additional css classes */
Expand Down
4 changes: 2 additions & 2 deletions src/src/tabs/Intro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ class Intro extends React.Component<IntroProps, IntroState> {
});
}

editLinkCard() {
editLinkCard(): React.JSX.Element | null {
if (this.state.editLink) {
return <EditIntroLinkDialog
link={this.state.link}
Expand Down Expand Up @@ -455,7 +455,7 @@ class Intro extends React.Component<IntroProps, IntroState> {
return null;
}

getButtons(classes: Record<string, any>) {
getButtons(classes: Record<string, any>): React.JSX.Element[] {
const buttons = [];

if (this.state.edit) {
Expand Down

0 comments on commit 6c8c3cb

Please sign in to comment.