1.0.6 • Published 1 year ago

@portabletext/solid v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@portabletext/solid

npm versionnpm bundle size

Render Portable Text with Solid JS.

Table of contents

Installation

npm install --save @portabletext/solid

Basic usage

import { PortableText, type PortableTextComponents } from '@portabletext/solid'
import type { PortableTextBlock } from '@portabletext/types'
import type { Component } from 'solid-js'

const blocks: PortableTextBlock[] = [
  /* array of portable text blocks */
]

const components: PortableTextComponents = {
  /* optional object of custom components to use */
}

const App: Component = () => {
  return <PortableText value={blocks} components={components} />
}

Credits

This repository is based on solid-portabletext, shoutout to @nonphoto for the original work 💖

License

MIT

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago