2017-11-17 14:38:54 +08:00
|
|
|
import * as React from 'react';
|
2017-07-07 13:36:54 +08:00
|
|
|
import classNames from 'classnames';
|
2018-12-05 19:12:18 +08:00
|
|
|
import { ConfigConsumer, ConfigConsumerProps } from '../config-provider';
|
2017-07-07 13:36:54 +08:00
|
|
|
|
|
|
|
export interface CardGridProps {
|
|
|
|
prefixCls?: string;
|
|
|
|
style?: React.CSSProperties;
|
|
|
|
className?: string;
|
|
|
|
}
|
|
|
|
|
2018-12-05 19:12:18 +08:00
|
|
|
export default (props: CardGridProps) => (
|
|
|
|
<ConfigConsumer>
|
|
|
|
{({ getPrefixCls }: ConfigConsumerProps) => {
|
|
|
|
const { prefixCls: customizePrefixCls, className, ...others } = props;
|
|
|
|
const prefixCls = getPrefixCls('card', customizePrefixCls);
|
|
|
|
const classString = classNames(`${prefixCls}-grid`, className);
|
|
|
|
return <div {...others} className={classString} />;
|
|
|
|
}}
|
|
|
|
</ConfigConsumer>
|
|
|
|
);
|