@@ -13,9 +13,18 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Stack Overflow frontend plugin
|
||||
*
|
||||
* @packageDocumentation
|
||||
*/
|
||||
export {
|
||||
stackOverflowPlugin,
|
||||
StackOverflowSearchResultListItem,
|
||||
HomePageStackOverflowQuestions,
|
||||
} from './plugin';
|
||||
export type {
|
||||
StackOverflowQuestion,
|
||||
StackOverflowQuestionsContentProps,
|
||||
StackOverflowQuestionsRequestParams,
|
||||
} from './types';
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
createPlugin,
|
||||
createComponentExtension,
|
||||
@@ -20,6 +21,11 @@ import {
|
||||
import { createCardExtension } from '@backstage/plugin-home';
|
||||
import { StackOverflowQuestionsContentProps } from './types';
|
||||
|
||||
/**
|
||||
* The Backstage plugin that holds stack overflow specific components
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const stackOverflowPlugin = createPlugin({
|
||||
id: 'stack-overflow',
|
||||
});
|
||||
@@ -29,7 +35,6 @@ export const stackOverflowPlugin = createPlugin({
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
|
||||
export const StackOverflowSearchResultListItem = stackOverflowPlugin.provide(
|
||||
createComponentExtension({
|
||||
name: 'StackOverflowResultListItem',
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Type representing a stack overflow question
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type StackOverflowQuestion = {
|
||||
title: string;
|
||||
link: string;
|
||||
@@ -22,10 +27,20 @@ export type StackOverflowQuestion = {
|
||||
answer_count: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* Props for HomePageStackOverflowQuestions
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type StackOverflowQuestionsContentProps = {
|
||||
requestParams: StackOverflowQuestionsRequestParams;
|
||||
};
|
||||
|
||||
/**
|
||||
* Type representing the request parameters accepted by the HomePageStackOverflowQuestions component
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type StackOverflowQuestionsRequestParams = {
|
||||
[key: string]: string | string[] | number;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user