Download next.js/examples/cms-sitecore-xmcloud/src/components/ContentBlock.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 803 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/cms-sitecore-xmcloud/src/components/ContentBlock.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/examples/cms-sitecore-xmcloud/src/components/ContentBlock.tsx
-
curl -L -o ContentBlock.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/cms-sitecore-xmcloud/src/components/ContentBlock.tsx
803 Bytes
| import { | |
| Text, | |
| RichText, | |
| Field, | |
| withDatasourceCheck, | |
| } from "@sitecore-jss/sitecore-jss-nextjs"; | |
| import { ComponentProps } from "lib/component-props"; | |
| type ContentBlockProps = ComponentProps & { | |
| fields: { | |
| heading: Field<string>; | |
| content: Field<string>; | |
| }; | |
| }; | |
| /** | |
| * A simple Content Block component, with a heading and rich text block. | |
| * This is the most basic building block of a content site, and the most basic | |
| * JSS component that's useful. | |
| */ | |
| const ContentBlock = ({ fields }: ContentBlockProps): JSX.Element => ( | |
| <div className="contentBlock"> | |
| <Text tag="h2" className="contentTitle" field={fields.heading} /> | |
| <RichText className="contentDescription" field={fields.content} /> | |
| </div> | |
| ); | |
| export default withDatasourceCheck()<ContentBlockProps>(ContentBlock); | |