mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-03 16:07:24 +00:00
45 lines
977 B
JavaScript
45 lines
977 B
JavaScript
import React, { Component } from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import classNames from 'classnames';
|
|
import ConfigProvider from '../config-provider';
|
|
|
|
/**
|
|
* Card.Content
|
|
* @order 3
|
|
*/
|
|
class CardContent extends Component {
|
|
static propTypes = {
|
|
prefix: PropTypes.string,
|
|
/**
|
|
* 设置标签类型
|
|
*/
|
|
component: PropTypes.elementType,
|
|
className: PropTypes.string,
|
|
};
|
|
|
|
static defaultProps = {
|
|
prefix: 'next-',
|
|
component: 'div',
|
|
};
|
|
|
|
render() {
|
|
const {
|
|
prefix,
|
|
className,
|
|
component: Component,
|
|
...others
|
|
} = this.props;
|
|
return (
|
|
<Component
|
|
{...others}
|
|
className={classNames(
|
|
`${prefix}card-content-container`,
|
|
className
|
|
)}
|
|
/>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default ConfigProvider.config(CardContent);
|