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
@@ -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}>