Download next.js/examples/cms-payload/components/VerticalPadding/index.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 586 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/cms-payload/components/VerticalPadding/index.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/examples/cms-payload/components/VerticalPadding/index.tsx
-
curl -L -o index.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/cms-payload/components/VerticalPadding/index.tsx
586 Bytes
| import React from "react"; | |
| import classes from "./index.module.scss"; | |
| export type VerticalPaddingOptions = "large" | "medium" | "none"; | |
| type Props = { | |
| top?: VerticalPaddingOptions; | |
| bottom?: VerticalPaddingOptions; | |
| children: React.ReactNode; | |
| className?: string; | |
| }; | |
| export const VerticalPadding: React.FC<Props> = ({ | |
| top = "medium", | |
| bottom = "medium", | |
| className, | |
| children, | |
| }) => { | |
| return ( | |
| <div | |
| className={[className, classes[`top-${top}`], classes[`bottom-${bottom}`]] | |
| .filter(Boolean) | |
| .join(" ")} | |
| > | |
| {children} | |
| </div> | |
| ); | |
| }; | |