diff --git a/src/ui/DependencyErrorSection.tsx b/src/ui/DependencyErrorSection.tsx index 70cfe47..eda4089 100644 --- a/src/ui/DependencyErrorSection.tsx +++ b/src/ui/DependencyErrorSection.tsx @@ -2,7 +2,8 @@ type DependencyErrorSectionProps = { title: string; items: string[]; setSelections: React.Dispatch>>; - description: string; + errorSubject: string; + errorDetails: React.ReactNode; }; /** @@ -12,19 +13,22 @@ type DependencyErrorSectionProps = { * @param props.title - The title of the section. * @param props.items - The missing dependents or dependencies. * @param props.setSelections - Updates data around packages selected for the release. - * @param props.description - Describes the error. + * @param props.errorSubject - Summarizes the error. + * @param props.errorDetails - Explains more about the error and how the user + * can fix it. * @returns The section component. */ export function DependencyErrorSection({ title, items, setSelections, - description, + errorSubject, + errorDetails, }: DependencyErrorSectionProps) { return ( -
+
-

{title}:

+

{title}

-

{description}

-
    +

    {errorSubject}

    +
    + + Read more + +
    {errorDetails}
    +
    +
      {items.map((dep) => ( -
    • - { +
    • + { + event.preventDefault(); document .getElementById(`package-${dep}`) ?.scrollIntoView({ behavior: 'smooth' }); @@ -56,7 +71,7 @@ export function DependencyErrorSection({ className="cursor-pointer hover:underline" > {dep} - +