How to use the @keystonejs/fields.Unsplash.blocks function in @keystonejs/fields

To help you get started, we’ve selected a few @keystonejs/fields examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github keystonejs / keystone / test-projects / basic / index.js View on Github external
rating
      }`,
      resolver: async () => {
        const data = [{ title: 'A movie', rating: 2 }, { title: 'Another movie', rating: 4 }];
        return data.map(({ title, rating }) => ({ title, rating }));
      },
    },
    value: {
      type: Content,
      blocks: [
        ...(cloudinaryAdapter
          ? [[CloudinaryImage.blocks.image, { adapter: cloudinaryAdapter }]]
          : []),
        ...(embedAdapter ? [[OEmbed.blocks.oEmbed, { adapter: embedAdapter }]] : []),
        ...(unsplash.accessKey
          ? [[Unsplash.blocks.unsplashImage, { attribution: 'KeystoneJS', ...unsplash }]]
          : []),
        Content.blocks.blockquote,
        Content.blocks.orderedList,
        Content.blocks.unorderedList,
        Content.blocks.link,
        Content.blocks.heading,
      ],
    },
  },
  adminConfig: {
    defaultPageSize: 20,
    defaultColumns: 'name, status',
    defaultSort: 'name',
  },
  labelResolver: async (item, args, context, { schema }) => {
    if (item.author) {

@keystonejs/fields

KeystoneJS Field Types including Text, Password, DateTime, Integer, and more.

MIT
Latest version published 3 years ago

Package Health Score

57 / 100
Full package analysis

Similar packages