Download netflix-clone-using-react/src/components/opt-form/index.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 780 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/netflix-clone-using-react/src/components/opt-form/index.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/netflix-clone-using-react/src/components/opt-form/index.js
-
curl -L -o index.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/netflix-clone-using-react/src/components/opt-form/index.js
780 Bytes
| import React from 'react'; | |
| import { Container, Input, Button, Text, Break } from './styles/opt-form'; | |
| export default function OptForm({ children, ...restProps }) { | |
| return <Container {...restProps}>{children}</Container>; | |
| } | |
| OptForm.Input = function OptFormInput({ ...restProps }) { | |
| return <Input {...restProps}></Input>; | |
| }; | |
| OptForm.Button = function OptFormButton({ children, ...restProps }) { | |
| return ( | |
| <Button {...restProps}> | |
| {children} <img src="/images/icons/chevron-right.png" alt="Try Now" /> | |
| </Button> | |
| ); | |
| }; | |
| OptForm.Text = function OptFormText({ children, ...restProps }) { | |
| return <Text { ...restProps}>{children}</Text>; | |
| }; | |
| OptForm.Break = function OptFormBreak({ ...restProps }) { | |
| return <Break {...restProps} />; | |
| }; |