1 | import _extends from 'babel-runtime/helpers/extends';
|
2 | import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
|
3 | import ShellBase from './shell';
|
4 | import Base from './base';
|
5 | import ConfigProvider from '../config-provider';
|
6 |
|
7 | var Shell = ShellBase({
|
8 | componentName: 'Shell'
|
9 | });
|
10 |
|
11 | ['Branding', 'Navigation', 'Action', 'MultiTask', 'LocalNavigation', 'AppBar', 'Content', 'Footer', 'Ancillary', 'ToolDock', 'ToolDockItem'].forEach(function (key) {
|
12 | Shell[key] = Base({
|
13 | componentName: key
|
14 | });
|
15 | });
|
16 |
|
17 | Shell.Page = ConfigProvider.config(ShellBase({
|
18 | componentName: 'Page'
|
19 | }));
|
20 |
|
21 | export default ConfigProvider.config(Shell, {
|
22 | transform: function transform(props, deprecated) {
|
23 | if ('Component' in props) {
|
24 | deprecated('Component', 'component', 'Shell');
|
25 |
|
26 | var _props = props,
|
27 | Component = _props.Component,
|
28 | component = _props.component,
|
29 | others = _objectWithoutProperties(_props, ['Component', 'component']);
|
30 |
|
31 | if ('component' in props) {
|
32 | props = _extends({ component: component }, others);
|
33 | } else {
|
34 | props = _extends({ component: Component }, others);
|
35 | }
|
36 | }
|
37 | return props;
|
38 | }
|
39 | }); |
\ | No newline at end of file |