UNPKG

731 BJavaScriptView Raw
1import classnames from 'classnames';
2import React from 'react';
3import InputGroupAddon from 'bee-input-group-addon';
4import InputGroupButton from './InputGroupButton';
5
6const defaultProps = {
7 clsPrefix: 'u-input-group',
8 simple: false
9}
10
11class InputGroup extends React.Component {
12 render() {
13 const { className,clsPrefix, simple,...others } = this.props;
14
15 return (
16 <span
17 {...others}
18 className={classnames(className, clsPrefix, simple&&'simple')}
19 />
20 );
21 }
22}
23
24/**
25 * 将InputGroupAddon与InputGroupButton组件作为InputGroup的附属组件
26 */
27InputGroup.Addon = InputGroupAddon;
28InputGroup.Button = InputGroupButton;
29InputGroup.defaultProps = defaultProps;
30export default InputGroup;
\No newline at end of file