Interface PCDUI<P, E>

When displaying a PCD in Zupass, the PCDUI methods will be used to generate a card and, optionally, a header (used only when PCDPackage.getDisplayOptions does not return a header).

Type Param

P the type of PCD rendered by this PCDUI

Type Param

E any extended props required to render the PCD card

interface PCDUI<P, E> {
    getHeader?(__namedParameters): ReactElement<any, string | JSXElementConstructor<any>>;
    renderCardBody(__namedParameters): ReactElement<any, string | JSXElementConstructor<any>>;
}

Type Parameters

  • P extends PCD
  • E = never

Methods

  • If the DisplayOptions#header returned by PCDPackage#getDisplayOptions is undefined, Zupass will call this function and use the result as the header of the card.

    Parameters

    • __namedParameters: {
          pcd: P;
      }
      • pcd: P

    Returns ReactElement<any, string | JSXElementConstructor<any>>

  • Intended to be used by Zupass. Given a PCD, renders the body of a card that appears in Zupass representing this PCD.

    Parameters

    • __namedParameters: {
          pcd: P;
      } & E

    Returns ReactElement<any, string | JSXElementConstructor<any>>

Generated using TypeDoc