File size: 930 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# SiteThumbnail
Renders a SiteThumbnail component.
## How to use
```jsx
import { SiteThumbnail } from '@automattic/components';
function render() {
return <SiteThumbnail alt="site thumbnail" />;
}
```
## Props
- `alt`: a required string
- `backgroundColor`: an optional string
- `mShotsUrl`: an optional string to create the mShot
- `style`: an optional CSSObject to override the image style
- `width`: an optional number used for mShot and image style
- `height`: an optional number used for mShot and image style
- `dimensionsSrcset`: an optional Array of {width, height} to append to `srcSet`
- `sizesAttr`: an optional string for image size attribute for resopnsive
- `children`: an optional node to render inside if mshot fails or is empty
- `bgColorImgUrl`: an optional string for creating a blur background
- `viewport`: an optional number for mShot window size
- `mshotsOption`: an optional object passed to mShots
|