preact-sample-sample-doc-list-custom-checkbox

PreviousNext
Docs
prosekitcomponent

Preview

Loading preview…
registry/src/preact/sample/sample-doc-list-custom-checkbox.ts
import type { NodeJSON } from 'prosekit/core'

export const sampleContent: NodeJSON = {
  type: 'doc',
  content: [
    {
      type: 'paragraph',
      content: [
        {
          type: 'text',
          text: 'Custom list checkbox design and strikethrough for completed tasks. Please check ',
        },
        { type: 'text', text: 'custom-list.css', marks: [{ type: 'code' }] },
        { type: 'text', text: ' for the styles.' },
      ],
    },
    {
      type: 'list',
      attrs: { kind: 'task', checked: true },
      content: [
        { type: 'paragraph', content: [{ type: 'text', text: 'Completed Task' }] },
      ],
    },
    {
      type: 'list',
      attrs: { kind: 'task', checked: false },
      content: [
        { type: 'paragraph', content: [{ type: 'text', text: 'Incomplete Task' }] },
      ],
    },
  ],
}

Installation

npx shadcn@latest add @prosekit/preact-sample-sample-doc-list-custom-checkbox

Usage

import { PreactSampleSampleDocListCustomCheckbox } from "@/components/preact-sample-sample-doc-list-custom-checkbox"
<PreactSampleSampleDocListCustomCheckbox />