Download e-commerce-site/src/components/Button.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 623 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/e-commerce-site/src/components/Button.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/e-commerce-site/src/components/Button.js
-
curl -L -o Button.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/e-commerce-site/src/components/Button.js
623 Bytes
| import styled from 'styled-components'; | |
| export const ButtonContainer = styled.button` | |
| text-transform:capitalize; | |
| font-size:1.4rem; | |
| background:transparent; | |
| border:0.05rem solid var(--lightBlue); | |
| border-color:${props => props.cart ? "var(--mainYellow)" :"var(--lightBlue)"}; | |
| border-radius:0.5rem; | |
| color:${props => props.cart ? "var(--mainYellow)" : "var(--lightBlue)"}; | |
| padding:0.2rem 0.5rem; | |
| cursor:pointer; | |
| margin:0.2rem 0.5rem 0.2rem 0; | |
| transition:all 0.5s ease-in-out; | |
| &:hover{ | |
| background:${props => props.cart ? "var(--mainYellow)" : "var(--lightBlue)"}; | |
| color:var(--mainBlue); | |
| } | |
| :focus{ | |
| outline:none; | |
| } | |
| `; |