UNPKG

1.99 kBJavaScriptView Raw
1import _extends from 'babel-runtime/helpers/extends';
2import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
3import ConfigProvider from '../config-provider';
4import Card from './card';
5import CardHeader from './header';
6import CardBulletHeader from './bullet-header';
7import CardMedia from './media';
8import CardDivider from './divider';
9import CardContent from './content';
10import CollaspeContent from './collapse-content';
11import CardActions from './actions';
12
13Card.Header = CardHeader;
14Card.Media = CardMedia;
15Card.Divider = CardDivider;
16Card.Content = CardContent;
17Card.Actions = CardActions;
18Card.BulletHeader = CardBulletHeader;
19Card.CollaspeContent = CollaspeContent;
20Card.CollapseContent = CollaspeContent;
21
22export default ConfigProvider.config(Card, {
23 transform: /* istanbul ignore next */function transform(props, deprecated) {
24 if ('titlePrefixLine' in props) {
25 deprecated('titlePrefixLine', 'showTitleBullet', 'Card');
26
27 var _props = props,
28 titlePrefixLine = _props.titlePrefixLine,
29 others = _objectWithoutProperties(_props, ['titlePrefixLine']);
30
31 props = _extends({ showTitleBullet: titlePrefixLine }, others);
32 }
33 if ('titleBottomLine' in props) {
34 deprecated('titleBottomLine', 'showHeadDivider', 'Card');
35
36 var _props2 = props,
37 titleBottomLine = _props2.titleBottomLine,
38 _others = _objectWithoutProperties(_props2, ['titleBottomLine']);
39
40 props = _extends({ showHeadDivider: titleBottomLine }, _others);
41 }
42 if ('bodyHeight' in props) {
43 deprecated('bodyHeight', 'contentHeight', 'Card');
44
45 var _props3 = props,
46 bodyHeight = _props3.bodyHeight,
47 _others2 = _objectWithoutProperties(_props3, ['bodyHeight']);
48
49 props = _extends({ contentHeight: bodyHeight }, _others2);
50 }
51
52 return props;
53 }
54});
\No newline at end of file