-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
keyboard navigation should only work when focused on the table (#2110)
- Loading branch information
1 parent
0aa0045
commit 21d8bc9
Showing
5 changed files
with
67 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import type { ReactNodeLike } from 'prop-types'; | ||
import { withStyles } from '@mui/styles'; | ||
import { Grid } from '@mui/material'; | ||
import { Utils } from '@iobroker/adapter-react-v5'; | ||
import React from 'react'; | ||
|
||
const styles = { | ||
root: { | ||
height: '100%', | ||
overflow: 'hidden', | ||
}, | ||
overflowAuto: { | ||
overflow: 'auto', | ||
}, | ||
} as const; | ||
|
||
interface TabContentProps { | ||
/** The content of the component. */ | ||
children: ReactNodeLike; | ||
/** Overflow behavior */ | ||
overflow: string; | ||
/** Additional css classes */ | ||
classes: { [key in keyof typeof styles]: string}; | ||
} | ||
|
||
class TabContent extends React.Component<TabContentProps> { | ||
render(): React.JSX.Element { | ||
const { classes } = this.props; | ||
|
||
return <Grid | ||
item | ||
className={Utils.clsx(classes.root, { [classes.overflowAuto]: this.props.overflow === 'auto' })} | ||
> | ||
{this.props.children} | ||
</Grid>; | ||
} | ||
} | ||
|
||
export default withStyles(styles)(TabContent); |