committed by
Jaco Greeff
parent
04ed53e0f2
commit
0f41c5b847
@@ -30,15 +30,22 @@ export default class Container extends Component {
|
||||
compact: PropTypes.bool,
|
||||
light: PropTypes.bool,
|
||||
style: PropTypes.object,
|
||||
tabIndex: PropTypes.number,
|
||||
title: nodeOrStringProptype()
|
||||
}
|
||||
|
||||
render () {
|
||||
const { children, className, compact, light, style } = this.props;
|
||||
const { children, className, compact, light, style, tabIndex } = this.props;
|
||||
const classes = `${styles.container} ${light ? styles.light : ''} ${className}`;
|
||||
|
||||
const props = {};
|
||||
|
||||
if (Number.isInteger(tabIndex)) {
|
||||
props.tabIndex = tabIndex;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={ classes } style={ style }>
|
||||
<div className={ classes } style={ style } { ...props }>
|
||||
<Card className={ compact ? styles.compact : styles.padded }>
|
||||
{ this.renderTitle() }
|
||||
{ children }
|
||||
|
||||
Reference in New Issue
Block a user