Skip to content

astro-portabletext@0.4.0-next.3

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 24 Sep 07:21
· 285 commits to main since this release
59d1951

Minor Changes

  • 11ffafc: BREAKING Changed NodeType type from enum to string

    • This effects PortableText prop onMissingComponent handler
  • 9753535: Brings in consistent naming, which reflects Portable Text node types.

    T NodeType

    - type NodeType = "block" | "blockStyle" | "listStyle" | "listItemStyle" | "mark";
    + type NodeType = "type" | "block" | "list" | "listItem" | "mark";

    T PortableTextComponents

    Property Counterpart
    type unknownType
    block unknownBlockStyle unknownBlock
    list unknownList
    listItem unknownListItem
    mark unknownMark
    hardBreak

    PortableText

    <PortableText
      components={{
    -   unknownBlockStyle: /* custom component */;
    +   unknownBlock: /* custom component */;
      }}
    >