1 | import _extends from 'babel-runtime/helpers/extends';
|
2 | import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
|
3 | import ConfigProvider from '../config-provider';
|
4 | import Card from './card';
|
5 | import CardHeader from './header';
|
6 | import CardBulletHeader from './bullet-header';
|
7 | import CardMedia from './media';
|
8 | import CardDivider from './divider';
|
9 | import CardContent from './content';
|
10 | import CollaspeContent from './collapse-content';
|
11 | import CardActions from './actions';
|
12 |
|
13 | Card.Header = CardHeader;
|
14 | Card.Media = CardMedia;
|
15 | Card.Divider = CardDivider;
|
16 | Card.Content = CardContent;
|
17 | Card.Actions = CardActions;
|
18 | Card.BulletHeader = CardBulletHeader;
|
19 | Card.CollaspeContent = CollaspeContent;
|
20 | Card.CollapseContent = CollaspeContent;
|
21 |
|
22 | export default ConfigProvider.config(Card, {
|
23 | transform: 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 |