How to use the idyll-components.Preload function in idyll-components

To help you get started, we’ve selected a few idyll-components 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 idyll-lang / idyll / packages / idyll-docs / idyll-components / contents.js View on Github external
name: 'shareImageWidth',
                type: 'string',
                description: 'The width of the share image in pixels.'
              },
              {
                name: 'shareImageHeight',
                type: 'string',
                description: 'The height of the share image in pixels.'
              }
            ]
          }
        },
        {
          Preload: {
            thumbnail: 'preload.png',
            component: COMPONENTS.Preload,
            description:
              'This will preload an array of images, useful if you want to show them later on in the article and not have a loading flash.',
            liveExample: false
          }
        }
      ]
    }
  }
];

function slugify(text) {
  return text
    .toString()
    .split(/([A-Z][a-z]+)/)
    .join('-')
    .toLowerCase()