|
Download wp-calypso/packages/components/src/site-thumbnail/README.md from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 930 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/components/src/site-thumbnail/README.md
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/packages/components/src/site-thumbnail/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/components/src/site-thumbnail/README.md
930 Bytes
SiteThumbnail
Renders a SiteThumbnail component.
How to use
import { SiteThumbnail } from '@automattic/components';
function render() {
return <SiteThumbnail alt="site thumbnail" />;
}
Props
alt: a required stringbackgroundColor: an optional stringmShotsUrl: an optional string to create the mShotstyle: an optional CSSObject to override the image stylewidth: an optional number used for mShot and image styleheight: an optional number used for mShot and image styledimensionsSrcset: an optional Array of {width, height} to append tosrcSetsizesAttr: an optional string for image size attribute for resopnsivechildren: an optional node to render inside if mshot fails or is emptybgColorImgUrl: an optional string for creating a blur backgroundviewport: an optional number for mShot window sizemshotsOption: an optional object passed to mShots