UNPKG

1.3 kBJavaScriptView Raw
1import _extends from 'babel-runtime/helpers/extends';
2import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
3import ShellBase from './shell';
4import Base from './base';
5import ConfigProvider from '../config-provider';
6
7var 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
17Shell.Page = ConfigProvider.config(ShellBase({
18 componentName: 'Page'
19}));
20
21export default ConfigProvider.config(Shell, {
22 transform: /* istanbul ignore next */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