Download next.js/examples/cms-prismic/slices/Image/index.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 421 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/cms-prismic/slices/Image/index.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/examples/cms-prismic/slices/Image/index.tsx
-
curl -L -o index.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/cms-prismic/slices/Image/index.tsx
421 Bytes
| import { PrismicNextImage } from "@prismicio/next"; | |
| import { SliceComponentProps } from "@prismicio/react"; | |
| import { Content } from "@prismicio/client"; | |
| type ImageProps = SliceComponentProps<Content.ImageSlice>; | |
| const Image = ({ slice }: ImageProps) => { | |
| return ( | |
| <section className="my-12"> | |
| <PrismicNextImage field={slice.primary.image} layout="responsive" /> | |
| </section> | |
| ); | |
| }; | |
| export default Image; | |