chowa
Version:
UI component library based on React
28 lines (27 loc) • 1.09 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 utils_1 = require("../utils");
const classNames = require("classnames");
const List = (props) => {
const { className, style, children } = props;
const comonentClass = classNames({
[utils_1.preClass('typography-list')]: true,
[className]: utils_1.isExist(className)
});
return (React.createElement("ul", Object.assign({ className: comonentClass, style: style }, utils_1.omitProps(props, ['className', 'style'])), React.Children.map(children, (child, key) => (React.createElement("li", { key: key, className: utils_1.preClass('typography-list-item') }, child)))));
};
List.propTypes = {
className: PropTypes.string,
style: PropTypes.object
};
exports.default = List;