forked from react-bootstrap/react-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJumbotron.js
More file actions
34 lines (26 loc) · 792 Bytes
/
Jumbotron.js
File metadata and controls
34 lines (26 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import React from 'react';
import classNames from 'classnames';
import elementType from 'react-prop-types/lib/elementType';
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
const propTypes = {
componentClass: elementType,
};
const defaultProps = {
componentClass: 'div',
};
class Jumbotron extends React.Component {
render() {
const { componentClass: Component, className, ...props } = this.props;
const [bsProps, elementProps] = splitBsProps(props);
const classes = getClassSet(bsProps);
return (
<Component
{...elementProps}
className={classNames(className, classes)}
/>
);
}
}
Jumbotron.propTypes = propTypes;
Jumbotron.defaultProps = defaultProps;
export default bsClass('jumbotron', Jumbotron);