From 3f8a7d70265b6299aa1ed8b48fcc0b66527eb356 Mon Sep 17 00:00:00 2001 From: Kalle Ericson <7943407+kalleericson@users.noreply.github.com> Date: Wed, 11 Dec 2024 10:58:09 +0100 Subject: [PATCH] fix: removing additional interface Signed-off-by: Kalle Ericson <7943407+kalleericson@users.noreply.github.com> --- plugins/scaffolder-react/report-alpha.api.md | 16 +++++----------- .../components/TemplateCard/TemplateCard.tsx | 13 +++++-------- .../TemplateCard/TemplateCardLinks.tsx | 7 +++++-- .../src/next/components/TemplateCard/index.ts | 6 +----- 4 files changed, 16 insertions(+), 26 deletions(-) diff --git a/plugins/scaffolder-react/report-alpha.api.md b/plugins/scaffolder-react/report-alpha.api.md index 1dd44bb00a..7084625ad4 100644 --- a/plugins/scaffolder-react/report-alpha.api.md +++ b/plugins/scaffolder-react/report-alpha.api.md @@ -266,20 +266,14 @@ export interface TaskStepsProps { // @alpha export const TemplateCard: (props: TemplateCardProps) => React_2.JSX.Element; -// @alpha (undocumented) -export interface TemplateCardAdditionalLink { - // (undocumented) - icon: IconComponent; - // (undocumented) - text: string; - // (undocumented) - url: string; -} - // @alpha export interface TemplateCardProps { // (undocumented) - additionalLinks?: TemplateCardAdditionalLink[]; + additionalLinks?: { + icon: IconComponent; + text: string; + url: string; + }[]; // (undocumented) onSelected?: (template: TemplateEntityV1beta3) => void; // (undocumented) diff --git a/plugins/scaffolder-react/src/next/components/TemplateCard/TemplateCard.tsx b/plugins/scaffolder-react/src/next/components/TemplateCard/TemplateCard.tsx index dab69e092d..d8057b9867 100644 --- a/plugins/scaffolder-react/src/next/components/TemplateCard/TemplateCard.tsx +++ b/plugins/scaffolder-react/src/next/components/TemplateCard/TemplateCard.tsx @@ -37,20 +37,17 @@ const useStyles = makeStyles(() => ({ actionContainer: { padding: '16px', flex: 1, alignItems: 'flex-end' }, })); -/** @alpha */ -export interface TemplateCardAdditionalLink { - icon: IconComponent; - text: string; - url: string; -} - /** * The Props for the {@link TemplateCard} component * @alpha */ export interface TemplateCardProps { template: TemplateEntityV1beta3; - additionalLinks?: TemplateCardAdditionalLink[]; + additionalLinks?: { + icon: IconComponent; + text: string; + url: string; + }[]; onSelected?: (template: TemplateEntityV1beta3) => void; } diff --git a/plugins/scaffolder-react/src/next/components/TemplateCard/TemplateCardLinks.tsx b/plugins/scaffolder-react/src/next/components/TemplateCard/TemplateCardLinks.tsx index 845c4c1621..f626875818 100644 --- a/plugins/scaffolder-react/src/next/components/TemplateCard/TemplateCardLinks.tsx +++ b/plugins/scaffolder-react/src/next/components/TemplateCard/TemplateCardLinks.tsx @@ -22,7 +22,6 @@ import { makeStyles, Theme } from '@material-ui/core/styles'; import LanguageIcon from '@material-ui/icons/Language'; import React from 'react'; import { CardLink } from './CardLink'; -import { TemplateCardAdditionalLink } from './TemplateCard'; const useStyles = makeStyles({}); @@ -32,7 +31,11 @@ const useStyles = makeStyles({}); */ export interface TemplateCardLinksProps { template: TemplateEntityV1beta3; - additionalLinks?: TemplateCardAdditionalLink[]; + additionalLinks?: { + icon: IconComponent; + text: string; + url: string; + }[]; } export const TemplateCardLinks = ({ template, diff --git a/plugins/scaffolder-react/src/next/components/TemplateCard/index.ts b/plugins/scaffolder-react/src/next/components/TemplateCard/index.ts index 768e5068dc..529aa938e4 100644 --- a/plugins/scaffolder-react/src/next/components/TemplateCard/index.ts +++ b/plugins/scaffolder-react/src/next/components/TemplateCard/index.ts @@ -13,8 +13,4 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export { - TemplateCard, - type TemplateCardProps, - type TemplateCardAdditionalLink, -} from './TemplateCard'; +export { TemplateCard, type TemplateCardProps } from './TemplateCard';