# &lt;SectionPreview /&gt; Component

## Description

A component for previewing blocks/sections -- Generates a picture of the provided component layout if a preview isn't provided

## Checklist

This component should...

- Rendering > Should render in the dom
- Rendering > Should auto generate an image based on the LayoutType passed in the props
- Rendering > Should show the previewImage (instead of the auto-generated image) when one is provided in the previewImage props
- Events > Should trigger the onAddSection event when the [add to page] button is clicked
- Events > Should receive the LayoutType when the onAddSection event is triggered
- Methods > Should show a popup window with the actual layout displaying when the [preview] button is clicked

## Usage

To install it...

> npm install @sandcastle/components

Add it to your project...

```
import * as React from 'react'
import * as SectionPreview from '@sandcastle/components/SectionPreview`

export default () => (
  <SectionPreview

  />
)
```

## Best Practices

To do: Add any Best Practices here

## Lifecycle Hooks

To do: Add any Lifecycle Hooks here

## Related Components

To do: Add any Related Components here
