chowa
Version:
UI component library based on React
38 lines (37 loc) • 1.23 kB
JavaScript
/**
* @license chowa v1.1.3
*
* Copyright (c) Chowa Techonlogies Co.,Ltd.(http://www.chowa.cn).
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
;
Object.defineProperty(exports, "__esModule", { value: true });
const React = require("react");
const PropTypes = require("prop-types");
const classnames_1 = require("classnames");
const utils_1 = require("../utils");
const list_item_1 = require("./list-item");
const List = (props) => {
const { children, className, style, bordered, highlight } = props;
const componentClass = classnames_1.default({
[utils_1.preClass('list')]: true,
[utils_1.preClass('list-bordered')]: bordered,
[utils_1.preClass('list-highlight')]: highlight,
[className]: utils_1.isExist(className)
});
return (React.createElement("ul", { style: style, className: componentClass }, children));
};
List.propTypes = {
className: PropTypes.string,
style: PropTypes.object,
bordered: PropTypes.bool,
highlight: PropTypes.bool
};
List.defaultProps = {
bordered: false,
highlight: false
};
List.Item = list_item_1.default;
exports.default = List;