Skip to content

Commit d3d7a7b

Browse files
committed
components to own directories, type improvements
1 parent c795447 commit d3d7a7b

File tree

14 files changed

+68
-28
lines changed

14 files changed

+68
-28
lines changed

src/plugins/management/public/_index.scss

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@import './sidebar_nav';
1+
@import './management_sidebar_nav/index';

src/plugins/management/public/components/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@
1818
*/
1919

2020
export { ManagementSidebarNav } from './management_sidebar_nav';
21+
export { ManagementChrome } from './management_chrome';
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
export { ManagementChrome } from './management_chrome';

src/plugins/management/public/management_chrome.tsx renamed to src/plugins/management/public/components/management_chrome/management_chrome.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@
2020
import * as React from 'react';
2121
import { EuiPage, EuiPageBody } from '@elastic/eui';
2222
import { I18nProvider } from '@kbn/i18n/react';
23-
import { ManagementSidebarNav } from './components';
24-
import { LegacySection } from './types';
25-
import { ManagementSection } from './management_section';
23+
import { ManagementSidebarNav } from '../management_sidebar_nav';
24+
import { LegacySection } from '../../types';
25+
import { ManagementSection } from '../../management_section';
2626

2727
interface Props {
2828
getSections: () => ManagementSection[];
2929
legacySections: LegacySection[];
3030
selectedId: string;
31-
mountedCallback: (element: HTMLDivElement) => void;
31+
onMounted: (element: HTMLDivElement) => void;
3232
}
3333

3434
export class ManagementChrome extends React.Component<Props> {
3535
private container = React.createRef<HTMLDivElement>();
3636
componentDidMount() {
3737
if (this.container.current) {
38-
this.props.mountedCallback(this.container.current);
38+
this.props.onMounted(this.container.current);
3939
}
4040
}
4141
render() {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import './sidebar_nav';
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
export { ManagementSidebarNav } from './management_sidebar_nav';

src/plugins/management/public/components/management_sidebar_nav.test.ts renamed to src/plugins/management/public/components/management_sidebar_nav/management_sidebar_nav.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
* under the License.
1818
*/
1919

20-
import { IndexedArray } from '../../../../legacy/ui/public/indexed_array';
21-
import { mergeLegacyItems } from '../components/management_sidebar_nav';
20+
import { IndexedArray } from '../../../../../legacy/ui/public/indexed_array';
21+
import { mergeLegacyItems } from './management_sidebar_nav';
2222

2323
const toIndexedArray = (initialSet: any[]) =>
2424
new IndexedArray({

0 commit comments

Comments
 (0)