Skip to content

Block styles inside list items #56

@taylortouchless

Description

@taylortouchless

I have a setup like this:

import { PortableText } from '@portabletext/solid';

export default function Home() {
  return (
    <main>
      <PortableText
        value={[
          {
            listItem: 'number',
            markDefs: [],
            children: [
              {
                _key: '45ec4de97f48',
                _type: 'span',
                marks: [],
                text: 'Finally, enter your contact information and review your service appointment. You’re all set!',
              },
            ],
            level: 1,
            _type: 'block',
            style: 'medium',
            // style: 'normal',
            _key: '2d7d1c82304f',
          },
        ]}
        components={{
          block: {
            medium: ({ children }) => (
              <p class="font-medium text-lg">{children}</p>
            ),
          },
        }}
      />
    </main>
  );
}

When the // style: 'normal' is uncommented and we use 'medium' instead, the whole app crashes. I tested using portabletext/react and it works fine there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions