Download next.js/examples/cms-payload/components/Gutter/index.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 701 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/cms-payload/components/Gutter/index.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/examples/cms-payload/components/Gutter/index.tsx
-
curl -L -o index.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/cms-payload/components/Gutter/index.tsx
701 Bytes
| import React, { forwardRef, Ref } from "react"; | |
| import classes from "./index.module.scss"; | |
| type Props = { | |
| left?: boolean; | |
| right?: boolean; | |
| className?: string; | |
| children: React.ReactNode; | |
| ref?: Ref<HTMLDivElement>; | |
| }; | |
| export const Gutter: React.FC<Props> = forwardRef<HTMLDivElement, Props>( | |
| (props, ref) => { | |
| const { left = true, right = true, className, children } = props; | |
| return ( | |
| <div | |
| ref={ref} | |
| className={[ | |
| left && classes.gutterLeft, | |
| right && classes.gutterRight, | |
| className, | |
| ] | |
| .filter(Boolean) | |
| .join(" ")} | |
| > | |
| {children} | |
| </div> | |
| ); | |
| }, | |
| ); | |
| Gutter.displayName = "Gutter"; | |