forked from react-bootstrap/react-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInputGroup.js
More file actions
31 lines (25 loc) · 792 Bytes
/
Copy pathInputGroup.js
File metadata and controls
31 lines (25 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
import classNames from 'classnames';
import React from 'react';
import InputGroupAddon from './InputGroupAddon';
import InputGroupButton from './InputGroupButton';
import { bsClass, bsSizes, getClassSet, splitBsProps }
from './utils/bootstrapUtils';
import { Size } from './utils/StyleConfig';
class InputGroup extends React.Component {
render() {
const { className, ...props } = this.props;
const [bsProps, elementProps] = splitBsProps(props);
const classes = getClassSet(bsProps);
return (
<span
{...elementProps}
className={classNames(className, classes)}
/>
);
}
}
InputGroup.Addon = InputGroupAddon;
InputGroup.Button = InputGroupButton;
export default bsClass('input-group',
bsSizes([Size.LARGE, Size.SMALL], InputGroup)
);