We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d13565 commit b99a277Copy full SHA for b99a277
packages/react-bootstrap-table2/src/caption.js
@@ -4,16 +4,22 @@ import PropTypes from 'prop-types';
4
5
const Caption = (props) => {
6
if (!props.children) return null;
7
- return (
8
- <caption>{ props.children }</caption>
+
+ const caption = props.bootstrap4 ? (
9
+ <caption style={ { captionSide: 'top' } }>{props.children}</caption>
10
+ ) : (
11
+ <caption>{props.children}</caption>
12
);
13
14
+ return caption;
15
};
16
17
Caption.propTypes = {
18
children: PropTypes.oneOfType([
19
PropTypes.node,
20
PropTypes.string
- ])
21
+ ]),
22
+ bootstrap4: PropTypes.bool
23
24
25
export default Caption;
0 commit comments