Socket
Socket
Sign inDemoInstall

@reecem/svelte-slicezone

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @reecem/svelte-slicezone

SvelteKit SliceZone component for Prismic SliceMachine


Version published
Weekly downloads
1
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Svelte Slicezone

This is a slice zone component for Prismic.

The current component makes the current assumptions:

There is a document that is passed that has a slices key:

{
	// other keys
	slices: []
}

To use the SliceZone and resolver.

<script>
	import { SliceZone, SliceResolver, getPageProps } from '@reecem/svelte-slicezone';

	// Load the index listing of slices.
	import * as Slices from '$lib/slices';
	// this is the list of slices to provide.
	// you can add others from other libs
	const allSlices = { ...Slices, /** ...anotherList */ };


	export const document = await getPageProps({
		client: Client(),
		type: 'homepage',
	});

</script>

<!-- This is the slicezone. The resolver can be overridden, but not really needed. -->
<SliceZone
	{...document}
	{allSlices}
	resolver={SliceResolver}
/>

Keywords

FAQs

Last updated on 13 Jan 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc