Updating API docs

Signed-off-by: Kalle Ericson <7943407+kalleericson@users.noreply.github.com>
This commit is contained in:
Kalle Ericson
2024-11-18 14:20:46 +01:00
parent 28e286f146
commit da10bec266
8 changed files with 117 additions and 5 deletions
+90 -5
View File
@@ -54,6 +54,32 @@ export type BackstageTemplateStepperClassKey =
| 'footer'
| 'formWrapper';
// @alpha
export const CardHeader: (props: CardHeaderProps) => React_2.JSX.Element;
// @alpha
export interface CardHeaderProps {
// (undocumented)
template: TemplateEntityV1beta3;
}
// @alpha
export const CardLink: ({
icon: Icon,
text,
url,
}: CardLinkProps) => React_2.JSX.Element;
// @alpha
export interface CardLinkProps {
// (undocumented)
icon: IconComponent;
// (undocumented)
text: string;
// (undocumented)
url: string;
}
// @alpha (undocumented)
export const createAsyncValidators: (
rootSchema: JsonObject,
@@ -266,20 +292,79 @@ export interface TaskStepsProps {
// @alpha
export const TemplateCard: (props: TemplateCardProps) => React_2.JSX.Element;
// @alpha
export const TemplateCardActions: ({
canCreateTask,
handleChoose,
ownedByRelations,
}: TemplateCardActionsProps) => React_2.JSX.Element;
// @alpha
export interface TemplateCardActionsProps {
// (undocumented)
canCreateTask: boolean;
// (undocumented)
handleChoose: () => void;
// (undocumented)
ownedByRelations: any;
}
// @alpha (undocumented)
export interface TemplateCardAdditionalLink {
// (undocumented)
icon: IconComponent;
// (undocumented)
text: string;
// (undocumented)
url: string;
}
// @alpha
export const TemplateCardContent: ({
template,
}: TemplateCardContentProps) => React_2.JSX.Element;
// @alpha
export interface TemplateCardContentProps {
// (undocumented)
template: TemplateEntityV1beta3;
}
// @alpha
export const TemplateCardLinks: ({
template,
additionalLinks,
}: TemplateCardLinksProps) => React_2.JSX.Element;
// @alpha
export interface TemplateCardLinksProps {
// (undocumented)
additionalLinks?: TemplateCardAdditionalLink[];
// (undocumented)
template: TemplateEntityV1beta3;
}
// @alpha
export interface TemplateCardProps {
// (undocumented)
additionalLinks?: {
icon: IconComponent;
text: string;
url: string;
}[];
additionalLinks?: TemplateCardAdditionalLink[];
// (undocumented)
onSelected?: (template: TemplateEntityV1beta3) => void;
// (undocumented)
template: TemplateEntityV1beta3;
}
// @alpha
export const TemplateCardTags: ({
template,
}: TemplateCardTagsProps) => React_2.JSX.Element;
// @alpha
export interface TemplateCardTagsProps {
// (undocumented)
template: TemplateEntityV1beta3;
}
// @alpha
export const TemplateCategoryPicker: () => React_2.JSX.Element | null;
@@ -39,6 +39,7 @@ const useStyles = makeStyles<
/**
* Props for the CardHeader component
* @alpha
*/
export interface CardHeaderProps {
template: TemplateEntityV1beta3;
@@ -46,6 +47,7 @@ export interface CardHeaderProps {
/**
* The Card Header with the background for the TemplateCard.
* @alpha
*/
export const CardHeader = (props: CardHeaderProps) => {
const {
@@ -19,6 +19,10 @@ import { Link } from '@backstage/core-components';
import { makeStyles } from '@material-ui/core/styles';
import React from 'react';
/**
* Props for the Card Links component
* @alpha
*/
export interface CardLinkProps {
icon: IconComponent;
text: string;
@@ -32,6 +36,10 @@ const useStyles = makeStyles(() => ({
},
}));
/**
* The Card Links used for the TemplateCard.
* @alpha
*/
export const CardLink = ({ icon: Icon, text, url }: CardLinkProps) => {
const styles = useStyles();
@@ -37,6 +37,7 @@ const useStyles = makeStyles<Theme>(() => ({
actionContainer: { padding: '16px', flex: 1, alignItems: 'flex-end' },
}));
/** @alpha */
export interface TemplateCardAdditionalLink {
icon: IconComponent;
text: string;
@@ -45,6 +45,10 @@ export interface TemplateCardActionsProps {
canCreateTask: boolean;
handleChoose: () => void;
}
/**
* The `TemplateCardActions` component that is rendered at the Actions-section of the TemplateCard
* @alpha
*/
export const TemplateCardActions = ({
canCreateTask,
handleChoose,
@@ -44,6 +44,10 @@ const useStyles = makeStyles(() => ({
export interface TemplateCardContentProps {
template: TemplateEntityV1beta3;
}
/**
* The `TemplateCardContent` component that is rendered at the Content-section of the TemplateCard
* @alpha
*/
export const TemplateCardContent = ({ template }: TemplateCardContentProps) => {
const styles = useStyles();
return (
@@ -34,6 +34,10 @@ export interface TemplateCardLinksProps {
template: TemplateEntityV1beta3;
additionalLinks?: TemplateCardAdditionalLink[];
}
/**
* The `TemplateCardLinks` component that is rendered at the Links-section of the TemplateCard
* @alpha
*/
export const TemplateCardLinks = ({
template,
additionalLinks,
@@ -27,6 +27,10 @@ import React from 'react';
export interface TemplateCardTagsProps {
template: TemplateEntityV1beta3;
}
/**
* The `TemplateCardTags` component that is rendered at the Tags-section of the TemplateCard
* @alpha
*/
export const TemplateCardTags = ({ template }: TemplateCardTagsProps) => (
<>
<Grid item xs={12}>