feat: export the same github component as card and as a page

Signed-off-by: Kamil Wolny <mrwolny@gmail.com>
This commit is contained in:
Kamil Wolny
2022-08-01 22:52:42 +01:00
parent ff3d0e6779
commit 6c5bec2362
5 changed files with 2 additions and 82 deletions
@@ -1,24 +0,0 @@
/*
* Copyright 2022 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { FunctionComponent } from 'react';
import { GitHubIssues, Props as GitHubIssuesProps } from '../GitHubIssues';
type Props = Omit<GitHubIssuesProps, 'mode'>;
export const GitHubIssuesCard: FunctionComponent<Props> = props => {
return <GitHubIssues mode="card" {...props} />;
};
@@ -1,16 +0,0 @@
/*
* Copyright 2022 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from './GitHubIssuesCard';
@@ -1,23 +0,0 @@
/*
* Copyright 2022 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { FunctionComponent } from 'react';
import { GitHubIssues, Props as GitHubIssuesProps } from '../GitHubIssues';
type Props = Omit<GitHubIssuesProps, 'mode'>;
export const GitHubIssuesPage: FunctionComponent<Props> = props => {
return <GitHubIssues mode="page" {...props} />;
};
@@ -1,16 +0,0 @@
/*
* Copyright 2022 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from './GitHubIssuesPage';
+2 -3
View File
@@ -34,8 +34,7 @@ export const GitHubIssuesCard = gitHubIssuesPlugin.provide(
createComponentExtension({
name: 'GitHubIssuesCard',
component: {
lazy: () =>
import('./components/GitHubIssuesCard').then(m => m.GitHubIssuesCard),
lazy: () => import('./components/GitHubIssues').then(m => m.GitHubIssues),
},
}),
);
@@ -45,7 +44,7 @@ export const GitHubIssuesPage = gitHubIssuesPlugin.provide(
createRoutableExtension({
name: 'GitHubIssuesPage',
component: () =>
import('./components/GitHubIssuesPage').then(m => m.GitHubIssuesPage),
import('./components/GitHubIssues').then(m => m.GitHubIssues),
mountPoint: rootRouteRef,
}),
);